Skip to content

Commit

Permalink
Managing RLE
Browse files Browse the repository at this point in the history
  • Loading branch information
jarredSafegraph committed Feb 5, 2024
1 parent df1d277 commit b719b7e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions placekey/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
log.setLevel(logging.ERROR)
log.handlers = [console_log]


class PlacekeyAPI:
"""
PlacekeyAPI class
Expand Down Expand Up @@ -284,6 +285,10 @@ def make_request(data):
data=json.dumps(data).encode('utf-8')
)

if response.status_code == 429:
raise RateLimitException("Rate limit exceeded", 0)

# Assumption: A code other than 429 is handled by calling function
return response

return make_request

0 comments on commit b719b7e

Please sign in to comment.