Retry exhausted exception
| 62 | |
| 63 | |
| 64 | class RetryExhaustedError(Exception): |
| 65 | """Retry exhausted exception""" |
| 66 | |
| 67 | def __init__(self, last_exception: Exception, attempts: int): |
| 68 | self.last_exception = last_exception |
| 69 | self.attempts = attempts |
| 70 | super().__init__(f"Retry failed after {attempts} attempts. Last error: {str(last_exception)}") |
| 71 | |
| 72 | |
| 73 | def async_retry( |