#[non_exhaustive]pub enum CrawlError {
Show 13 variants
Network {
message: String,
status_code: Option<u16>,
},
Http(String),
InvalidUrl(String),
Parse(String),
RateLimit,
MaxDepthExceeded {
current: u8,
max: u8,
},
MaxPagesExceeded {
max: usize,
},
UrlExcluded(String),
InvalidContentType(String),
Io(Error),
Semaphore(String),
Internal(String),
Sitemap(String),
}Expand description
Crawl errors
Following err-thiserror-for-libraries: Uses thiserror for library error types. Following api-non-exhaustive: Can add variants without breaking changes. Following clean-architecture: NO dependencies on reqwest/anyhow (Infra layer)
§Architecture Note
This error type does NOT contain reqwest::Error or anyhow::Error.
Those are infrastructure details. The Infrastructure layer converts
reqwest::Error → CrawlError::Network and anyhow::Error → specific variants.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Network
Network error during HTTP request
Note: Does NOT contain reqwest::Error (that’s Infra detail). Infrastructure layer converts reqwest::Error → this variant.
Http(String)
HTTP error (status code or request failure)
InvalidUrl(String)
URL parsing error
Parse(String)
HTML parsing error
RateLimit
Rate limit exceeded
MaxDepthExceeded
Maximum depth exceeded
MaxPagesExceeded
Maximum pages exceeded
UrlExcluded(String)
URL excluded by pattern
InvalidContentType(String)
Invalid content type
Io(Error)
I/O error
Semaphore(String)
Semaphore error (concurrency control)
Internal(String)
Internal error (unspecified)
Sitemap(String)
Sitemap parsing error (FASE 3) Note: Does NOT contain sitemap_parser::SitemapError (that’s Infra detail). Infrastructure layer converts SitemapError → this variant.
Trait Implementations§
Source§impl Debug for CrawlError
impl Debug for CrawlError
Source§impl Display for CrawlError
impl Display for CrawlError
Source§impl Error for CrawlError
impl Error for CrawlError
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
Auto Trait Implementations§
impl Freeze for CrawlError
impl !RefUnwindSafe for CrawlError
impl Send for CrawlError
impl Sync for CrawlError
impl Unpin for CrawlError
impl UnsafeUnpin for CrawlError
impl !UnwindSafe for CrawlError
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.