Base class for deepl module exceptions. :param message: Message describing the error that occurred. :param should_retry: True if the request would normally be retried following this error, otherwise false. :param http_status_code: The HTTP status code in the response, if
| 8 | |
| 9 | |
| 10 | class DeepLException(Exception): |
| 11 | """Base class for deepl module exceptions. |
| 12 | |
| 13 | :param message: Message describing the error that occurred. |
| 14 | :param should_retry: True if the request would normally be retried |
| 15 | following this error, otherwise false. |
| 16 | :param http_status_code: The HTTP status code in the response, if |
| 17 | applicable, otherwise None. |
| 18 | """ |
| 19 | |
| 20 | def __init__( |
| 21 | self, |
| 22 | message: str, |
| 23 | should_retry: bool = False, |
| 24 | http_status_code: Optional[int] = None, |
| 25 | ): |
| 26 | super().__init__(message) |
| 27 | self.should_retry = should_retry |
| 28 | self.http_status_code = http_status_code |
| 29 | |
| 30 | |
| 31 | class AuthorizationException(DeepLException): |
no outgoing calls
no test coverage detected