pub enum HttpError {
Transport {
source: Error,
},
InvalidRequest {
details: String,
},
ServerError {
status: u16,
body: String,
},
Timeout,
BuildRequest {
details: String,
},
ClientError {
source: Error,
},
}Expand description
A generic error enumeration for HTTP-related issues.
Specific client integrations (like Hyper or Reqwest) can define their own
errors and provide From implementations to convert to this HttpError
or directly to CrateError.
The Controller might look for this specific error type if it needs to
make decisions based on “is this an HTTP protocol error vs. a network error”.
Variants§
Transport
An error occurred during the transport of the request (e.g., network issue, DNS).
InvalidRequest
The request itself was malformed or invalid before sending.
ServerError
The server responded with an error status code (e.g., 4xx, 5xx)
that is not automatically handled as a retry by the RetryLogic.
This is for cases where the AdaptiveConcurrencyLimit might want to know
it was a server-side HTTP error specifically.
Timeout
A timeout occurred.
BuildRequest
An error occurred while building the request.
ClientError
Other, unspecified HTTP client errors.
Trait Implementations§
Source§impl Error for HttpError
impl Error for HttpError
Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
replaced by Error::source, which can support downcasting
Source§impl ErrorCompat for HttpError
impl ErrorCompat for HttpError
Source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Error::source. Read more