Exception raised when AWS API rate limits are exceeded.
| 77 | |
| 78 | |
| 79 | class RateLimitError(AWSServiceError): |
| 80 | """Exception raised when AWS API rate limits are exceeded.""" |
| 81 | |
| 82 | def __init__(self, message: str, wait_time: Optional[int] = None): |
| 83 | suggestion = f"Wait for {wait_time} seconds before retrying." if wait_time else "Reduce the frequency of API calls or implement exponential backoff." |
| 84 | super().__init__(message, suggestion) |
| 85 | |
| 86 | |
| 87 | class ResourceLimitError(AWSServiceError): |