pub enum SpiderError {
Config(String),
Fetch(FetchError),
Browser(BrowserError),
Session(String),
Checkpoint(String),
RobotsTxt(String),
Other(String),
}Expand description
The central error type for everything that can go wrong during a crawl.
Each variant wraps either a structured error from a downstream crate or a
human-readable String describing the problem. You will typically encounter
this type through the Result alias rather than constructing it directly.
Variants§
Config(String)
A configuration validation error, raised when spider settings are invalid (for example, a negative checkpoint interval). The string describes what was wrong with the configuration.
Fetch(FetchError)
An error originating from the HTTP fetch layer (scrapling-fetch). This
wraps the underlying FetchError so you can inspect network-level details
such as connection timeouts or DNS failures.
Browser(BrowserError)
An error originating from the browser automation layer (scrapling-browser).
This wraps the underlying BrowserError, which covers headless-browser
launch failures, page navigation errors, and similar issues.
Session(String)
A session management error, raised when a requested session ID does not exist or when a duplicate session is registered. Check the contained message for the list of available session IDs.
Checkpoint(String)
A checkpoint save or restore error, raised when the crawler cannot write or read its state snapshot on disk. Common causes include missing directories and permission problems.
RobotsTxt(String)
A robots.txt parsing or enforcement error. In practice this variant is rarely surfaced because the robots.txt manager degrades gracefully (treating unparseable files as “allow all”), but it exists for explicit error paths.
Other(String)
A catch-all error for uncategorized failures that do not fit into any other variant. Use this sparingly; prefer a more specific variant when one applies.
Trait Implementations§
Source§impl Debug for SpiderError
impl Debug for SpiderError
Source§impl Display for SpiderError
impl Display for SpiderError
Source§impl Error for SpiderError
impl Error for SpiderError
1.30.0 · 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()
Source§impl From<BrowserError> for SpiderError
impl From<BrowserError> for SpiderError
Source§fn from(e: BrowserError) -> Self
fn from(e: BrowserError) -> Self
Source§impl From<FetchError> for SpiderError
impl From<FetchError> for SpiderError
Source§fn from(e: FetchError) -> Self
fn from(e: FetchError) -> Self
Auto Trait Implementations§
impl Freeze for SpiderError
impl !RefUnwindSafe for SpiderError
impl Send for SpiderError
impl Sync for SpiderError
impl Unpin for SpiderError
impl UnsafeUnpin for SpiderError
impl !UnwindSafe for SpiderError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more