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()