Skip to main content

Module error

Module error 

Source

Enums§

RuntimeError

Constants§

VETTED_PROXY_ERROR_TYPES
Wire error classes we recognise on broker-proxied (OpenAI-compatible) non-2xx responses. Superset of [VETTED_ERROR_TYPES]: it adds the OpenAI/Kimi/xAI-style error.type / error.code values so a proxied failure can be named via OUR static label — never the provider’s bytes.

Functions§

error_chain_string
Render an error’s full cause chain (Display of every level, : -joined).
humanize_api_error
Translate an Anthropic API error response into a human-actionable message.
humanize_api_error_with_reset
Like humanize_api_error but surfaces a known rate-limit reset time in the 429 message so the failure is honest rather than cryptic. reset_hint is a human-readable duration string, e.g. "47s".
humanize_network_error
Translate a reqwest transport error into a human-actionable message.
humanize_provider_network_error
Host-aware variant of humanize_network_error for non-Anthropic providers (OpenAI Codex, Groq, local OpenAI-compat endpoints, …).
humanize_proxy_status_error
User-actionable message for a broker-proxied non-2xx response when the (status, vetted label) pair is one we understand; None otherwise so the caller keeps the raw provider request failed: … prefix.
sanitize_error_type
Map an untrusted provider error-type string onto a vetted static label.
vetted_proxy_error_label
Classify an untrusted proxied error body onto a vetted static label.

Type Aliases§

Result