Skip to main content

deserialize_api_error

Function deserialize_api_error 

Source
pub fn deserialize_api_error(status: StatusCode, body: &[u8]) -> AnthropicError
Expand description

Deserializes an API error from the response body

Attempts to parse the error as JSON, falling back to plain text on failure.