pub enum Error {
Show 53 variants
InvalidUrl(String),
InvalidMethod(String),
InvalidHeaderName(String),
InvalidHeaderValue(String),
RequestBuild(String),
InvalidResolvedTarget(String),
ResolvedTargetRedirect,
JsonSerialize(String),
JsonDeserialize(String),
Connect(String),
CustomTransport(Arc<DialError>),
Tls(String),
Protocol(String),
Body(String),
Hyper(Arc<Error>),
HyperClient(Arc<Error>),
Io(Arc<Error>),
Unsupported(String),
Pool(String),
InvalidRedirectLocation(String),
InvalidAuthHeader(String),
ConflictingAuth(String),
BodyNotReplayableForRedirect,
TooManyRedirects {
followed: usize,
max: usize,
},
Decompression(String),
UnsupportedContentEncoding(String),
Timeout {
phase: TimeoutPhase,
elapsed: Duration,
},
TransportIoTimeout {
direction: TransportIoDirection,
elapsed: Duration,
},
InvalidProxyUrl(String),
ProxyConnect(String),
ProxyAuthRequired,
ProxyConnectRejected {
status: u16,
body: String,
},
MalformedProxyResponse(String),
DecodedBodyTooLarge,
DecompressionRatioExceeded,
TlsConfig(String),
CaBundle(String),
ClientCert(String),
PrivateKey(String),
CertificateVerification(String),
HostnameVerification(String),
BodyNotReplayableForRetry,
RetryBudgetExhausted {
attempts: usize,
},
RetryNotConfigured,
Http2GoAway {
last_stream_id: u32,
debug_data: String,
},
Http2StreamReset {
reason: String,
},
Http2FlowControl(String),
Http2Protocol(String),
H3Connect(String),
H3ConnectionClosed(String),
H3Stream(String),
H3Protocol(String),
TraceCallbackAborted,
}Expand description
Error taxonomy for the eggfetch engine.
This is the single error entry point for callers. Source errors are
preserved via std::error::Error::source.
Variants§
InvalidUrl(String)
The provided URL could not be parsed.
InvalidMethod(String)
The provided HTTP method could not be parsed.
InvalidHeaderName(String)
The provided header name is not valid.
InvalidHeaderValue(String)
The provided header value is not valid.
RequestBuild(String)
The request could not be built.
InvalidResolvedTarget(String)
A caller-supplied resolved destination is invalid for the request.
ResolvedTargetRedirect
A pinned request attempted to follow a redirect that changes origin.
JsonSerialize(String)
Request JSON serialization failed.
JsonDeserialize(String)
Response JSON deserialization failed.
Connect(String)
A connection could not be established.
CustomTransport(Arc<DialError>)
A caller-supplied native dialer failed.
Tls(String)
A TLS handshake or configuration error occurred.
Protocol(String)
An HTTP protocol error occurred.
Body(String)
An error occurred while processing a request or response body.
Hyper(Arc<Error>)
An error from the underlying hyper HTTP engine.
HyperClient(Arc<Error>)
An error from the hyper-util legacy client.
Io(Arc<Error>)
An I/O error occurred.
Unsupported(String)
The requested feature is not yet supported.
Pool(String)
Connection pool acquisition failed or was cancelled.
InvalidRedirectLocation(String)
The redirect location is missing or invalid.
InvalidAuthHeader(String)
An authentication header value is invalid.
ConflictingAuth(String)
Conflicting authentication sources (e.g., explicit header + auth config).
BodyNotReplayableForRedirect
A streaming body cannot be replayed for a redirect.
TooManyRedirects
Too many redirects were followed.
Decompression(String)
A response decompression error occurred.
UnsupportedContentEncoding(String)
The server used a content encoding that is not supported.
Timeout
A timeout elapsed during the specified phase.
Fields
phase: TimeoutPhaseWhich phase of the request timed out.
TransportIoTimeout
An established transport made no read or write progress before its dedicated inactivity deadline.
Fields
direction: TransportIoDirectionWhich established I/O direction stalled.
InvalidProxyUrl(String)
The proxy URL is invalid or malformed.
ProxyConnect(String)
The proxy server rejected the connection or tunnel.
ProxyAuthRequired
The proxy server requires authentication.
ProxyConnectRejected
The CONNECT tunnel was rejected by the proxy.
MalformedProxyResponse(String)
The proxy response could not be parsed.
DecodedBodyTooLarge
The decoded body exceeded the configured size limit.
DecompressionRatioExceeded
The decompression ratio exceeded the configured limit.
TlsConfig(String)
A TLS configuration error occurred.
CaBundle(String)
A CA certificate bundle could not be parsed.
ClientCert(String)
A client certificate or private key could not be loaded.
PrivateKey(String)
A private key could not be parsed or decrypted.
CertificateVerification(String)
Certificate verification failed.
HostnameVerification(String)
Hostname verification failed.
BodyNotReplayableForRetry
The request body is not replayable and cannot be retried.
RetryBudgetExhausted
The retry budget was exhausted.
RetryNotConfigured
Retry is not enabled for this request or client.
Http2GoAway
The HTTP/2 connection received a GOAWAY frame from the server.
last_stream_id is currently always 0: h2 0.4 does not expose
the GOAWAY last-stream-id through its public error API, so the raw
error text is preserved in debug_data instead.
Fields
Http2StreamReset
An HTTP/2 stream was reset by the server with the given reason code.
Http2FlowControl(String)
An HTTP/2 flow-control error occurred.
Http2Protocol(String)
An HTTP/2 protocol error occurred.
H3Connect(String)
An HTTP/3 connection error occurred.
H3ConnectionClosed(String)
An HTTP/3 connection was closed by the peer.
H3Stream(String)
An HTTP/3 stream error occurred.
H3Protocol(String)
An HTTP/3 protocol error occurred.
TraceCallbackAborted
A trace callback signaled the transport to abort.
Implementations§
Source§impl Error
impl Error
Sourcepub fn custom_transport_error(&self) -> Option<&DialError>
pub fn custom_transport_error(&self) -> Option<&DialError>
Returns the nested caller error when this is a custom-dialer failure.
Sourcepub fn is_physical_connection_admission_timeout(&self) -> bool
pub fn is_physical_connection_admission_timeout(&self) -> bool
Returns whether this is a physical-connection admission timeout.
Sourcepub fn is_transport_io_timeout(&self) -> bool
pub fn is_transport_io_timeout(&self) -> bool
Returns whether this is an established-transport inactivity timeout.
Sourcepub fn transport_failure_kind(&self) -> Option<TransportFailureKind>
pub fn transport_failure_kind(&self) -> Option<TransportFailureKind>
Classify this error into a generic native transport-failure category.
The classifier is diagnostic only and does not imply retryability.
None means the available typed evidence does not prove one of the
TransportFailureKind categories. Timeout, physical-admission,
and transport-I/O-inactivity facts remain authoritative through
their existing accessors and never map here.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()