ready for try
This commit is contained in:
@@ -70,6 +70,8 @@ class RateLimitError(ClientError):
|
||||
"""Raised when rate limit is exceeded (429)."""
|
||||
|
||||
def __init__(self, message: str, retry_after: Optional[int] = None, **kwargs):
|
||||
# Remove status_code from kwargs if present to avoid duplicate argument
|
||||
kwargs.pop('status_code', None)
|
||||
super().__init__(message, status_code=429, **kwargs)
|
||||
self.retry_after = retry_after
|
||||
|
||||
|
||||
Reference in New Issue
Block a user