Skip to content

Exceptions

AuthenticationTooSlow

Bases: HttpException

Raised if the authentication grant expired

Source code in src/bungio/error.py
92
93
94
95
96
97
98
@custom_define()
class AuthenticationTooSlow(HttpException):
    """
    Raised if the authentication grant expired
    """

    pass

BadRequest

Bases: HttpException

Raised if the resource returned a generic error (400)

Source code in src/bungio/error.py
83
84
85
86
87
88
89
@custom_define()
class BadRequest(HttpException):
    """
    Raised if the resource returned a generic error (400)
    """

    pass

BungIOException

Bases: Exception

The base exception.

Source code in src/bungio/error.py
21
22
23
24
25
26
27
@custom_define()
class BungIOException(Exception):
    """
    The base exception.
    """

    pass

BungieDead

Bases: HttpException

Raised if bungie is down. Usually this mean maintenance, see their twitter for more info

Source code in src/bungio/error.py
101
102
103
104
105
106
107
@custom_define()
class BungieDead(HttpException):
    """
    Raised if bungie is down. Usually this mean maintenance, see their [twitter](https://twitter.com/BungieHelp) for more info
    """

    pass

BungieException

Bases: HttpException

An exception raised by bungie

Attributes:

Name Type Description
error str

The exception bungie raised

message str

The message bungie returned

code int

The code of the exception

data dict

The data of the exception

Source code in src/bungio/error.py
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
@custom_define()
class BungieException(HttpException):
    """
    An exception raised by bungie

    Attributes:
        error: The exception bungie raised
        message: The message bungie returned
        code: The code of the exception
        data: The data of the exception
    """

    error: str = custom_field()
    message: str = custom_field()
    code: int = custom_field()
    data: dict = custom_field()

HttpException

Bases: BungIOException

The base http exception.

Source code in src/bungio/error.py
30
31
32
33
34
35
36
@custom_define()
class HttpException(BungIOException):
    """
    The base http exception.
    """

    pass

InvalidAuthentication

Bases: HttpException

Raised if the passed authentication is invalid

Attributes:

Name Type Description
auth AuthData

The passed authentication

Source code in src/bungio/error.py
62
63
64
65
66
67
68
69
70
71
@custom_define()
class InvalidAuthentication(HttpException):
    """
    Raised if the passed authentication is invalid

    Attributes:
        auth: The passed authentication
    """

    auth: "AuthData"

NotFound

Bases: HttpException

Raised if the resource was not found (404)

Source code in src/bungio/error.py
74
75
76
77
78
79
80
@custom_define()
class NotFound(HttpException):
    """
    Raised if the resource was not found (404)
    """

    pass

TimeoutException

Bases: HttpException

If the requests failed multiple times in a row without a specific exception

Source code in src/bungio/error.py
115
116
117
118
119
120
121
@custom_define()
class TimeoutException(HttpException):
    """
    If the requests failed multiple times in a row without a specific exception
    """

    pass