pub enum FetchError {
Network(String),
Abort(String),
Timeout(String),
TooManyRedirects(u32),
RedirectRefused(String),
Blocked(String),
Denied(Denied),
InvalidUrl(String),
Body(String),
Bridge(String),
}Expand description
A fetch engine failure.
Variants§
Network(String)
A transport failure (connection refused, reset past the retry
budget, TLS error, DNS). WHATWG surfaces this as TypeError.
Abort(String)
The request’s AbortSignal fired.
Timeout(String)
The per-request timeout elapsed.
TooManyRedirects(u32)
redirect: follow exceeded the redirect budget.
RedirectRefused(String)
redirect: error saw a 3xx, or a redirect target had no Location
that could be resolved.
Blocked(String)
The sandbox network guard denied the URL or a resolved address.
Denied(Denied)
The realm’s net grant refused the host. Kept typed so a runtime
can throw it as the permission error it is.
InvalidUrl(String)
A URL could not be parsed / resolved against the base URL.
Body(String)
The response body could not be read.
Bridge(String)
The host-owned cookie jar or defaults could not be read or written
(see crate::ContextBridge).
Trait Implementations§
Source§impl Debug for FetchError
impl Debug for FetchError
Source§impl Display for FetchError
impl Display for FetchError
Source§impl Error for FetchError
impl Error for FetchError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<GuardError> for FetchError
impl From<GuardError> for FetchError
Source§fn from(e: GuardError) -> Self
fn from(e: GuardError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FetchError
impl RefUnwindSafe for FetchError
impl Send for FetchError
impl Sync for FetchError
impl Unpin for FetchError
impl UnsafeUnpin for FetchError
impl UnwindSafe for FetchError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more