Skip to main content

classify_status

Function classify_status 

Source
pub const fn classify_status(status: u16) -> Option<RemoteCode>
Expand description

The code for an HTTP status (3.6 and 3.11); None for a success.

401 and 403 are unauthorized; 429 is rate_limited; 503 and 529 are overloaded; every other 4xx (400 and 422 by name) is malformed_request; everything else a success does not cover, 5xx or unclassifiable, is remote_error.