Skip to main content

map_api_error_body

Function map_api_error_body 

Source
pub fn map_api_error_body(bytes: &[u8]) -> Option<Box<dyn Error + Send + Sync>>
Expand description

Decode a 400 response body into the corresponding typed error variant, returning None for unknown codes so callers can fall through to a generic transport error.