Skip to main content

parse_error_response

Function parse_error_response 

Source
pub async fn parse_error_response(
    response: Response,
    method: &str,
    path: &str,
) -> Error
Expand description

Converts a non-success HTTP response into the shared transport error shape.

If the response body already contains an API-style error document, the service message is preserved and the HTTP status is normalized into the error code. Otherwise the method, path, status, and response body are folded into a readable fallback message.