Перейти к содержанию

Исключения

BaseError

Bases: Exception

Base error class

Attributes:

Name Type Description
raw_response dict

RAW response from CryptoPay API.

raw_headers dict

RAW headers from CryptoPay API response.

Source code in src/CryptoPayAPI/errors.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
class BaseError(Exception):
    '''Base error class

    Attributes:
        raw_response (dict, optional): RAW response from CryptoPay API.
        raw_headers (dict, optional): RAW headers from CryptoPay API response.
    '''
    def __init__(self,
                 *args: object,
                 raw_response: Optional[dict] = None,
                 raw_headers: Optional[dict] = None) -> None:
        super().__init__(*args)
        self.raw_response = raw_response
        self.raw_headers = raw_headers

ExpiresInInvalidError

Bases: BaseError

Value of expires_in is invalid.

Source code in src/CryptoPayAPI/errors.py
43
44
45
46
class ExpiresInInvalidError(BaseError):
    '''Value of `expires_in` is invalid.
    '''
    pass

MethodDisabledError

Bases: BaseError

Requested method is disabled. Check bot settings.

Source code in src/CryptoPayAPI/errors.py
55
56
57
58
class MethodDisabledError(BaseError):
    '''Requested method is disabled. Check bot settings.
    '''
    pass

MethodNotFoundError

Bases: BaseError

Requested method is not found.

Source code in src/CryptoPayAPI/errors.py
31
32
33
34
class MethodNotFoundError(BaseError):
    '''Requested method is not found.
    '''
    pass

UnauthorizedError

Bases: BaseError

Authorization on CryptoPay API is failed, maybe incorect/expired API token.

Source code in src/CryptoPayAPI/errors.py
25
26
27
28
class UnauthorizedError(BaseError):
    '''Authorization on CryptoPay API is failed, maybe incorect/expired API token.
    '''
    pass

UnexpectedError

Bases: BaseError

Unexpected API error.

Source code in src/CryptoPayAPI/errors.py
37
38
39
40
class UnexpectedError(BaseError):
    '''Unexpected API error.
    '''
    pass

UpdateSignatureError

Bases: BaseError

Webhook signature validation error.

Source code in src/CryptoPayAPI/errors.py
49
50
51
52
class UpdateSignatureError(BaseError):
    '''Webhook signature validation error.
    '''
    pass

Последнее обновление: 11 января 2023 г.
Дата создания: 11 января 2023 г.