mirror of
https://github.com/anasty17/mirror-leech-telegram-bot.git
synced 2025-01-07 03:26:46 +08:00
09cc1b1f10
close #1514 Signed-off-by: anasty17 <e.anastayyar@gmail.com>
19 lines
527 B
Python
19 lines
527 B
Python
from httpx import RequestError, DecodingError
|
|
|
|
|
|
class APIError(Exception):
|
|
"""Base error for all exceptions from this Client."""
|
|
|
|
|
|
class APIConnectionError(RequestError, APIError):
|
|
"""Base class for all communications errors including HTTP errors."""
|
|
|
|
|
|
class LoginFailed(DecodingError, APIConnectionError):
|
|
"""This can technically be raised with any request since log in may be attempted for
|
|
any request and could fail."""
|
|
|
|
|
|
class NotLoggedIn(APIConnectionError):
|
|
"""Raised when login is not successful."""
|