Skip to main content

status_error

Function status_error 

Source
pub fn status_error(response: Response) -> SourceResult<Response>
Expand description

Map a non-success HTTP response onto a typed SourceError.

Returns the response unchanged on success; otherwise translates common status codes (401/403, 429, 404) into their dedicated variants.

ยงErrors

Returns a SourceError whenever response carries a non-success status.