Errors¶
Every error raised by this library derives from BitflyerError, so a single
except BitflyerError catches all of them. httpx transport errors are not
wrapped and propagate as-is.
BitflyerError
¶
Bases: Exception
Base class for every error raised by this library.
CredentialsError
¶
Bases: BitflyerError
A Private API call was attempted without an API key and secret.
APIError
¶
APIError(
message: str,
*,
status_code: int,
status: int | None = None,
error_message: str | None = None,
data: Any = None,
body: str = "",
request: Request | None = None,
response: Response | None = None,
)
Bases: BitflyerError
The bitFlyer API returned an error response.
Attributes:
| Name | Type | Description |
|---|---|---|
status_code |
HTTP status code of the response. |
|
status |
bitFlyer's numeric error code, or |
|
error_message |
bitFlyer's human-readable message, or |
|
data |
The |
|
body |
The raw response body, decoded as text. |
|
request |
The request that produced the error. |
|
response |
The error response. |
RateLimitError
¶
Bases: APIError
The request was rejected because a rate limit was exceeded.
Attributes:
| Name | Type | Description |
|---|---|---|
retry_after |
Seconds to wait before retrying, parsed from the
|
RealtimeError
¶
Bases: BitflyerError
The Realtime (WebSocket) API returned an error or the connection failed.