#[non_exhaustive]pub enum ErrorClass {
Auth,
RateLimit {
retry_after: Option<Duration>,
},
Server,
Client,
Timeout,
Transport,
Cancelled,
AddressDenied,
Invalid,
}Expand description
Coarse class of an HttpError, from HttpError::class. Apps map their own error
classes and retry sets from this one table instead of matching statuses themselves.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Auth
HTTP 401, 403 or 407.
RateLimit
HTTP 429. retry_after is the parsed Retry-After delay, when the server sent one.
Server
HTTP 5xx.
Client
Any other status: 4xx not listed above, or an unfollowed 3xx.
Timeout
A configured timeout elapsed, or the server answered HTTP 408 Request Timeout.
Transport
Connection, TLS or socket failure, or an exhausted redirect limit.
Cancelled
The call was cancelled.
AddressDenied
The outbound address policy refused the destination.
Invalid
The request could not be built, or the response body was malformed or oversized
(InvalidRequest, Json, Stream, BodyTooLarge), https_only refused a URL
(HttpsRequired), or a redirect target was refused (RedirectRefused).