Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
anasty17
GitHub Repository: anasty17/mirror-leech-telegram-bot
Path: blob/master/sabnzbdapi/exception.py
1628 views
1
from httpx import RequestError, DecodingError
2
3
4
class APIError(Exception):
5
"""Base error for all exceptions from this Client."""
6
7
8
class APIConnectionError(RequestError, APIError):
9
"""Base class for all communications errors including HTTP errors."""
10
11
12
class LoginFailed(DecodingError, APIConnectionError):
13
"""This can technically be raised with any request since log in may be attempted for
14
any request and could fail."""
15
16
17
class NotLoggedIn(APIConnectionError):
18
"""Raised when login is not successful."""
19
20