#[non_exhaustive]
pub enum HttpError {
Unknown,
Header(HeaderError),
HTTPBodyTooLarge,
Uri(UriError),
HTTPInvalidMethod,
HTTPInvalidStatusCode,
HTTPInvalidVersion,
HTTPFetchResponseNotFound,
HTTPFetchRequestFailed,
HTTPChannelClosed,
}
Expand description
Enums describing the errors that correspond to HTTP modules.
This is returned by methods similar to
crate::fetch::send()
for
error scenarios.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unknown
An unknown error occured while performing the request.
Header(HeaderError)
A header related error occured.
HTTPBodyTooLarge
HTTP body exceeds prescribed limits.
Uri(UriError)
A URI related error occured.
HTTPInvalidMethod
An invalid HTTP method was provided.
HTTPInvalidStatusCode
An invalid HTTP status code was provided.
HTTPInvalidVersion
An invalid HTTP version was provided.
HTTPFetchResponseNotFound
HTTPFetchRequestFailed
HTTPChannelClosed
Trait Implementations§
source§impl Error for HttpError
impl Error for HttpError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<HTTPBodyTooLargeError> for HttpError
impl From<HTTPBodyTooLargeError> for HttpError
source§fn from(_: HTTPBodyTooLargeError) -> Self
fn from(_: HTTPBodyTooLargeError) -> Self
Converts to this type from the input type.
source§impl From<HeaderError> for HttpError
impl From<HeaderError> for HttpError
source§fn from(source: HeaderError) -> Self
fn from(source: HeaderError) -> Self
Converts to this type from the input type.