Skip to main content

Error

Enum Error 

Source
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.

Fields

§followed: usize

Number of redirects actually followed.

§max: usize

Maximum allowed.

§

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: TimeoutPhase

Which phase of the request timed out.

§elapsed: Duration

The duration that was exceeded.

§

TransportIoTimeout

An established transport made no read or write progress before its dedicated inactivity deadline.

Fields

§direction: TransportIoDirection

Which established I/O direction stalled.

§elapsed: Duration

Duration for which no progress was observed.

§

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.

Fields

§status: u16

HTTP status code from the proxy.

§body: String

Response body or description.

§

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.

Fields

§attempts: usize

Number of attempts made.

§

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

§last_stream_id: u32

The last stream ID the server will process (currently always 0, see above).

§debug_data: String

Debug data from the GOAWAY frame.

§

Http2StreamReset

An HTTP/2 stream was reset by the server with the given reason code.

Fields

§reason: String

The HTTP/2 reason code (e.g., REFUSED_STREAM, CANCEL).

§

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

Source

pub fn kind(&self) -> &'static str

Returns the category of this error as a static string.

Source

pub fn custom_transport_error(&self) -> Option<&DialError>

Returns the nested caller error when this is a custom-dialer failure.

Source

pub fn is_physical_connection_admission_timeout(&self) -> bool

Returns whether this is a physical-connection admission timeout.

Source

pub fn is_transport_io_timeout(&self) -> bool

Returns whether this is an established-transport inactivity timeout.

Source

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 Clone for Error

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Arc<Error>> for Error

Source§

fn from(source: Arc<Error>) -> Self

Converts to this type from the input type.
Source§

impl From<Arc<Error>> for Error

Source§

fn from(source: Arc<Error>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Freeze for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more