Expand description
Shared error types for the workspace.
The runtime keeps transport, parsing, configuration, and pipeline failures in a small set of error enums so applications can match on them consistently.
§Example
ⓘ
use spider_util::error::{SpiderError, PipelineError};
use url::Url;
// URL parsing error
let result: Result<Url, SpiderError> = Url::parse("not-a-url").map_err(SpiderError::from);
if let Err(e) = result {
println!("Error: {}", e);
}
// Pipeline error
let pipeline_err = PipelineError::IoError("File not found".to_string());Structs§
- Reqwest
Error - Simplified wrapper around
reqwest::Error.
Enums§
- Pipeline
Error - Error type used by item pipelines.
- Spider
Error - Main runtime error type used across the crawler stack.