Skip to main content

Module error

Module error 

Source
Expand description

Error types for the bridge. Bridge error types and helpers for mapping Python exceptions to Rust errors.

Enums§

Error
All errors that can occur in the bridge layer.

Constants§

HTTP_CODE_UNKNOWN
Unset / unknown HTTP status code (0).
HTTP_SERVER_ERROR_MAX
End of the HTTP server error 5xx status code range (599).
HTTP_SERVER_ERROR_MIN
Start of the HTTP server error 5xx status code range (500).
HTTP_SERVICE_UNAVAILABLE
HTTP status code for Service Unavailable (503).
HTTP_TOO_MANY_REQUESTS
HTTP status code for Too Many Requests (429).

Functions§

http_code_is_quota
Whether an HTTP status code denotes a quota / rate-limit condition.
http_code_is_retryable
Whether an HTTP status code denotes a transiently retryable failure.
with_timeout
Run f with a timeout. Returns Error::Timeout if the future does not complete within timeout.