Errors¶
Exceptions raised by oxrpy.
OxfordAPIError ¶
Bases: Exception
Base class for every error oxrpy raises.
Attributes:
| Name | Type | Description |
|---|---|---|
message |
The API's |
|
status |
The HTTP status code, if there was a response. |
|
code |
The API's |
|
body |
The decoded JSON body, if there was one. |
AuthenticationError ¶
Bases: OxfordAPIError
401/403: missing or invalid server key, missing API package, or a bad/suspended app key.
BadRequestError ¶
Bases: OxfordAPIError
400: an unknown parameter, a bad value, or a malformed command body.
valid_parameters lists every parameter GET /v1/server accepts, when the API sends it.
NotFoundError ¶
Bases: OxfordAPIError
404: no such endpoint, or no command with that id (results are kept for 7 days).
EndpointRemovedError ¶
RateLimitError ¶
Bases: OxfordAPIError
429: rate limited, and the retries ran out.
retry_after is the number of seconds the API asked us to wait.
ServerOfflineError ¶
CommandFailedError ¶
Bases: OxfordAPIError
A command reached the server but did not succeed (only raised with check=True).
result is the full command result (CommandId, Status, Code, Message).