Skip to main content

map_response_error

Function map_response_error 

Source
pub fn map_response_error(
    status: u16,
    body: &str,
    retry_after_header: Option<&str>,
) -> ProviderError
Expand description

Map an OpenAI HTTP status + raw body text into a ProviderError.

The retry_after_header is the raw value of the Retry-After response header if present — it may be an integer number of seconds or an HTTP-date string.