Skip to content

Commit

Permalink
feature(api) - update raise from status to support too many request e…
Browse files Browse the repository at this point in the history
…rror
  • Loading branch information
almogch committed Dec 17, 2024
1 parent 6ebd5bc commit 99f7f2e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions intezer_sdk/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,7 @@ def __init__(self, response: requests.Response):
class AnalysisRateLimitError(ServerError):
def __init__(self, response: requests.Response):
super().__init__('Analysis rate limit reached', response)
self.limit = response.headers.get('X-RateLimit-Limit')
self.remaining = response.headers.get('X-RateLimit-Remaining')
self.reset_time_in_sec = response.headers.get('X-RateLimit-Reset')
self.retry_after = response.headers.get('Retry-After')

0 comments on commit 99f7f2e

Please sign in to comment.