peyk.transport.errors¶
Transport-level exceptions.
These carry only transport-level facts (connection failure, timeout, HTTP status, rate-limit hint). No platform-specific error-body parsing happens here or anywhere in this project — that is deliberately deferred to future per-platform adapters that sit on top of peyk.
Exceptions
|
Raised for any non-2xx HTTP response other than 429. |
Raised when the underlying connection fails. |
|
|
Raised when the server responds with HTTP 429 (Too Many Requests). |
Raised when a request does not complete within its configured timeout. |
|
Base class for all errors raised by the transport layer. |
- exception peyk.transport.errors.TransportError[source]¶
Bases:
ExceptionBase class for all errors raised by the transport layer.
- exception peyk.transport.errors.NetworkError[source]¶
Bases:
TransportErrorRaised when the underlying connection fails.
Covers DNS failure, connection refused, connection reset, and other transport-level connectivity problems that are not an HTTP response.
- exception peyk.transport.errors.TimeoutError_[source]¶
Bases:
TransportErrorRaised when a request does not complete within its configured timeout.
Named with a trailing underscore to avoid shadowing the builtin
TimeoutError.
- exception peyk.transport.errors.RateLimitedError(message: str, *, retry_after_seconds: float | None = None)[source]¶
Bases:
TransportErrorRaised when the server responds with HTTP 429 (Too Many Requests).
- Variables:
retry_after_seconds – The value of the response’s
Retry-Afterheader, parsed to seconds, if present and parseable.Noneif the header was absent or not parseable as a plain number of seconds.
- exception peyk.transport.errors.HTTPStatusError(message: str, *, status_code: int, body: bytes)[source]¶
Bases:
TransportErrorRaised for any non-2xx HTTP response other than 429.
- Variables:
status_code – The HTTP status code returned by the server.
body – The raw response body bytes (may be empty).