pub enum ErrorKind {
Show 17 variants
ConnectNotSupported,
ConnectError {
status_code: StatusCode,
body: Vec<u8>,
},
Http(Error),
Io(Error),
InvalidBaseUrl,
InvalidUrlHost,
InvalidUrlPort,
InvalidResponse(InvalidResponseKind),
TooManyRedirections,
StatusCode(StatusCode),
Json(Error),
UrlEncoded(Error),
Tls(Error),
InvalidDNSName(String),
InvalidMimeType(String),
TlsDisabled,
WebPKI(Error),
}
Expand description
Common errors that can occur during HTTP requests.
Variants§
ConnectNotSupported
CONNECT is not supported.
ConnectError
Fields
§
status_code: StatusCode
Status code from the proxy.
Could not connect to proxy with CONNECT method.
Http(Error)
Error generated by the http
crate.
Io(Error)
IO Error
InvalidBaseUrl
Invalid base URL given to the Request.
InvalidUrlHost
An URL with an invalid host was found while processing the request.
InvalidUrlPort
The URL scheme is unknown and the port is missing.
InvalidResponse(InvalidResponseKind)
Server sent an invalid response.
TooManyRedirections
Too many redirections
StatusCode(StatusCode)
Status code indicates failure
Json(Error)
JSON decoding/encoding error.
UrlEncoded(Error)
Form-URL encoding error.
Tls(Error)
TLS error encountered while connecting to an https server.
InvalidDNSName(String)
Invalid DNS name used for TLS certificate verification
InvalidMimeType(String)
Invalid mime type in a Multipart form
TlsDisabled
TLS was not enabled by features.
WebPKI(Error)
WebPKI error.