22 lines
446 B
Python
22 lines
446 B
Python
|
|
class ZaloApiError(Exception):
|
||
|
|
def __init__(self, error_code: int, description: str) -> None:
|
||
|
|
self.error_code = error_code
|
||
|
|
self.description = description
|
||
|
|
super().__init__(f"Zalo API Error [{error_code}]: {description}")
|
||
|
|
|
||
|
|
|
||
|
|
class ZaloAuthError(ZaloApiError):
|
||
|
|
pass
|
||
|
|
|
||
|
|
|
||
|
|
class ZaloRateLimitError(ZaloApiError):
|
||
|
|
pass
|
||
|
|
|
||
|
|
|
||
|
|
class ZaloNetworkError(Exception):
|
||
|
|
pass
|
||
|
|
|
||
|
|
|
||
|
|
class ZaloRetryableWebhookError(Exception):
|
||
|
|
pass
|