exceptions
Contains exceptions used by ro.py.
AssetNotFound
¶
Bases: ItemNotFound
Raised for invalid asset IDs.
Source code in roblox/utilities/exceptions.py
187 188 189 190 191 |
|
BadRequest
¶
Bases: HTTPException
HTTP exception raised for status code 400.
Source code in roblox/utilities/exceptions.py
100 101 102 |
|
BadgeNotFound
¶
Bases: ItemNotFound
Raised for invalid badge IDs.
Source code in roblox/utilities/exceptions.py
194 195 196 197 198 |
|
Forbidden
¶
Bases: HTTPException
HTTP exception raised for status code 403. This usually means the X-CSRF-Token was not properly provided.
Source code in roblox/utilities/exceptions.py
109 110 111 |
|
GroupNotFound
¶
Bases: ItemNotFound
Raised for invalid group IDs.
Source code in roblox/utilities/exceptions.py
201 202 203 204 205 |
|
HTTPException
¶
Bases: RobloxException
Exception that's raised when an HTTP request fails.
Attributes:
Name | Type | Description |
---|---|---|
response |
Response
|
The HTTP response object. |
status |
int
|
The HTTP response status code. |
errors |
List[ResponseError]
|
A list of Roblox response errors. |
Source code in roblox/utilities/exceptions.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
__init__(response, errors=None)
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
response |
Response
|
The raw response object. |
required |
errors |
Optional[list]
|
A list of errors. |
None
|
Source code in roblox/utilities/exceptions.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|
InternalServerError
¶
Bases: HTTPException
HTTP exception raised for status code 500. This usually means that there was an issue on Roblox's end, but due to faulty coding on Roblox's part this can sometimes mean that an endpoint used internally was disabled or that invalid parameters were passed.
Source code in roblox/utilities/exceptions.py
130 131 132 133 134 135 136 |
|
InvalidRole
¶
Bases: RobloxException
Raised when a role doesn't exist.
Source code in roblox/utilities/exceptions.py
157 158 159 160 161 |
|
ItemNotFound
¶
Bases: RobloxException
Raised for invalid items.
Source code in roblox/utilities/exceptions.py
172 173 174 175 176 177 178 179 180 181 182 183 184 |
|
__init__(message, response=None)
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
response |
Optional[Response]
|
The raw response object. |
None
|
Source code in roblox/utilities/exceptions.py
177 178 179 180 181 182 183 184 |
|
NoMoreItems
¶
Bases: RobloxException
Raised when there are no more items left to iterate through.
Source code in roblox/utilities/exceptions.py
164 165 166 167 168 |
|
NotFound
¶
Bases: HTTPException
HTTP exception raised for status code 404. This usually means we have an internal URL issue - please make a GitHub issue about this!
Source code in roblox/utilities/exceptions.py
114 115 116 117 118 119 |
|
PlaceNotFound
¶
Bases: ItemNotFound
Raised for invalid place IDs.
Source code in roblox/utilities/exceptions.py
208 209 210 211 212 |
|
PluginNotFound
¶
Bases: ItemNotFound
Raised for invalid plugin IDs.
Source code in roblox/utilities/exceptions.py
215 216 217 218 219 |
|
ResponseError
¶
Represents an error returned by a Roblox game server.
Attributes:
Name | Type | Description |
---|---|---|
code |
int
|
The error code. |
message |
Optional[str]
|
The error message. |
user_facing_message |
Optional[str]
|
A more simple error message intended for frontend use. |
field |
Optional[str]
|
The field causing this error. |
retryable |
Optional[str]
|
Whether retrying this exception could supress this issue. |
Source code in roblox/utilities/exceptions.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
RobloxException
¶
Bases: Exception
Base exception for all of ro.py.
Source code in roblox/utilities/exceptions.py
13 14 15 16 17 |
|
TooManyRequests
¶
Bases: HTTPException
HTTP exception raised for status code 429. This means that Roblox has ratelimited you.
Source code in roblox/utilities/exceptions.py
122 123 124 125 126 127 |
|
Unauthorized
¶
Bases: HTTPException
HTTP exception raised for status code 401. This usually means you aren't properly authenticated.
Source code in roblox/utilities/exceptions.py
105 106 |
|
UniverseNotFound
¶
Bases: ItemNotFound
Raised for invalid universe IDs.
Source code in roblox/utilities/exceptions.py
222 223 224 225 226 |
|
UserNotFound
¶
Bases: ItemNotFound
Raised for invalid user IDs or usernames.
Source code in roblox/utilities/exceptions.py
229 230 231 232 233 |
|
get_exception_from_status_code(code)
¶
Gets an exception that should be raised instead of the generic HTTPException for this status code.
Source code in roblox/utilities/exceptions.py
149 150 151 152 153 |
|