Error Set FetchError [src]

Errors

CertificateBundleLoadFailure RequestError
ConnectionRefused ConnectTcpError
ConnectionResetByPeer ConnectTcpError
ConnectionTimedOut ConnectTcpError
HostLacksNetworkAddresses ConnectTcpError
HttpChunkInvalid ReceiveHeadError
HttpChunkTruncated ReceiveHeadError
HttpConnectionClosing HeadError

The client sent 0 bytes of headers before closing the stream. This happens when a keep-alive connection is finally closed.

HttpContentEncodingUnsupported ReceiveHeadError
HttpHeadersInvalid ReceiveHeadError

Server sent headers that did not conform to the HTTP protocol.

To find out more detailed diagnostics, http.Reader.head_buffer can be passed directly to Request.Head.parse.

HttpHeadersOversize HeadError

Too many bytes of HTTP headers.

The HTTP specification suggests to respond with a 431 status code before closing the connection.

HttpRedirectLocationInvalid ReceiveHeadError
HttpRedirectLocationMissing ReceiveHeadError
HttpRedirectLocationOversize ReceiveHeadError
HttpRequestTruncated HeadError

Partial HTTP request was received but the connection was closed before fully receiving the headers.

InvalidFormat ParseError
InvalidPort ParseError
NameServerFailure ConnectTcpError
NetworkUnreachable ConnectTcpError
OutOfMemory Error
ReadFailed HeadError

Transitive error occurred reading from in.

RedirectRequiresResend ReceiveHeadError

This can be avoided by calling receiveHead before sending the request body.

StreamTooLong
TemporaryNameServerFailure ConnectTcpError
TlsInitializationFailed ConnectTcpError
TooManyHttpRedirects ReceiveHeadError
UnexpectedCharacter ParseError
UnexpectedConnectFailure ConnectTcpError
UnknownHostName ConnectTcpError
UnsupportedCompressionMethod
UnsupportedUriScheme RequestError
UriHostTooLong RequestError
UriMissingHost RequestError
WriteFailed ReceiveHeadError

Sending the request failed. Error code can be found on the Connection object.

Source

pub const FetchError = Uri.ParseError || RequestError || Request.ReceiveHeadError || error{ StreamTooLong, /// TODO provide optional diagnostics when this occurs or break into more error codes WriteFailed, UnsupportedCompressionMethod, }