Skip to main content

humanize_provider_network_error

Function humanize_provider_network_error 

Source
pub fn humanize_provider_network_error(e: &Error) -> String
Expand description

Host-aware variant of humanize_network_error for non-Anthropic providers (OpenAI Codex, Groq, local OpenAI-compat endpoints, …).

Unlike the Anthropic-specific helper this derives the host from the failing request’s URL and preserves the underlying cause chain, so chatgpt.com failures are never misattributed and the reason (timeout vs connect vs mid-stream drop) survives into the UI.