Errors¶
All exceptions raised by the client derive from RainbowMinerError.
rainbowminer_api_client.errors ¶
Exception hierarchy for the RainbowMiner API client.
All exceptions raised by the client derive from :class:RainbowMinerError so
callers can catch any library-specific error with a single except clause.
RainbowMinerConnectionError ¶
Bases: RainbowMinerError
Raised when the client cannot connect to the RainbowMiner API server.
RainbowMinerAuthError ¶
Bases: RainbowMinerError
Raised when the API server rejects the request with HTTP 401 Unauthorized.
RainbowMinerNotFoundError ¶
Bases: RainbowMinerError
Raised when the API server returns HTTP 404 for the requested resource.
RainbowMinerAPIError ¶
Bases: RainbowMinerError
Raised for any non-2xx HTTP status not covered by a more specific error.
Attributes:
| Name | Type | Description |
|---|---|---|
status_code |
The HTTP status code returned by the server. |
Store the HTTP status code alongside the error message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
Human-readable description of the error. |
required |
status_code
|
int
|
The HTTP status code returned by the server. |
required |