Exceptions
rblxopencloud.BaseException
Bases: Exception
The base exception for all exception raised by the library.
rblxopencloud.HttpException
Bases: BaseException
The base exception for HTTP request failures. In many situations, a different exception inheriting HttpException may be raised. Different exceptions that could be raised are as follows:
| Status | Exception | Description |
|---|---|---|
| 400 Bad Request | HttpException |
The request body is malformed or not valid. Some methods will return a specific error instead of HttpException. |
| 401 Unauthorized | HttpException |
The API key or OAuth2 bearer token is invalid, has expired, not from an accepted IP, or the API has been been enabled for the key. |
| 403 Forbidden | Forbidden |
The authorization doesn't have access to the requested resource. |
| 404 Not Found | NotFound |
The resource or endpoint could not be found. |
| 429 Rate Limited | RateLimited |
The resource is being rate limited. |
| 5xx Server Error | HttpException |
The server ran into an internal error and is unable to process the request. |
| Other Error Statuses | HttpException |
The server returned an unexpected HTTP status. |
Functions in the library that raise different exception from those above will be documented in the method itself.
Attributes:
| Name | Type | Description |
|---|---|---|
status_code |
Optional[int]
|
The HTTP status code returned by Roblox for this error. |
error_code |
Optional[Union[str, int]]
|
The error code returned by Roblox, if available. |
message |
Optional[str]
|
A string message returned by Roblox if available. This will not always be the same message as the one that appears in the console. |
details |
Optional[list[dict]]
|
A list of dict returned by Roblox if available which provides more details about an error. |
rblxopencloud.RateLimited
Bases: HttpException
Roblox blocked the request for exceeding the endpoint's rate limit. The library does not currently support any rate limiting handling but this exception can be used to implement automatic retrying.
rblxopencloud.NotFound
rblxopencloud.Forbidden
Bases: HttpException
This exception is raised if the API key or OAuth2 bearer token does not have access to the requested resource.
In certain situations, HttpException will be raised when Forbidden is expected. Some situations where this happens includes attempting to access a resource without the necessary OAuth2 scope or the API key permission and API enabled.
rblxopencloud.PreconditionFailed
Bases: Conflict
A precondition specified for the request was not met or failed. If raised by DataStore.set_entry, extra information about the entry's current value and info will be provided.
Attributes:
| Name | Type | Description |
|---|---|---|
value |
Optional[Union[str, dict, list, int, float]]
|
The current entry value, if raised by |
info |
Optional[EntryInfo]
|
The current entry information such as metadata, if raised by |
rblxopencloud.InvalidFile
Bases: HttpException
rblxopencloud.InvalidCode
rblxopencloud.ModeratedText
Bases: HttpException
rblxopencloud.UnknownEventType
Bases: BaseException
rblxopencloud.UnhandledEventType
Bases: BaseException