pub enum BrowserError {
Playwright(String),
Navigation(String),
Timeout(String),
PagePool(String),
Config(String),
Other(String),
}Expand description
Errors that can occur during browser automation operations.
Each variant carries a human-readable message describing what went wrong. When you match on this enum, the variant tells you the category of failure so you can decide whether to retry, reconfigure, or bail out.
Variants§
Playwright(String)
A Playwright driver or protocol error.
This variant is produced when the underlying Playwright Rust bindings return an
error – for example, when the browser process crashes, a CDP message fails, or
the driver cannot be started. It is also the target of the automatic
From<playwright_rs::Error> conversion.
A page navigation failure.
Returned when page.goto() fails, the page content cannot be extracted after
repeated retries, or the Cloudflare solver encounters an unrecoverable problem.
Check the inner message for details about which URL or step failed.
Timeout(String)
An operation exceeded its deadline.
Typically raised when wait_for_selector does not find the expected element
within timeout_ms. You can increase the timeout in [BrowserConfig] or the
per-request [FetchParams] to give the page more time to render.
PagePool(String)
A page-pool capacity or lookup error.
Returned when you try to register more pages than max_pages allows, or when
a page-index lookup fails. This usually means too many concurrent fetches are
in flight for the configured pool size.
Config(String)
An invalid or inconsistent configuration value.
Raised during [BrowserConfig::validate] or [StealthConfig::validate] when
a field is out of range (e.g. max_pages > 50), mutually exclusive options are
both set (e.g. proxy and proxy_rotator), or a file path does not exist.
Other(String)
An uncategorised error.
Catch-all for errors that do not fit neatly into the other categories. Inspect the inner message for specifics.
Trait Implementations§
Source§impl Debug for BrowserError
impl Debug for BrowserError
Source§impl Display for BrowserError
impl Display for BrowserError
Source§impl Error for BrowserError
impl Error for BrowserError
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()
Auto Trait Implementations§
impl Freeze for BrowserError
impl RefUnwindSafe for BrowserError
impl Send for BrowserError
impl Sync for BrowserError
impl Unpin for BrowserError
impl UnsafeUnpin for BrowserError
impl UnwindSafe for BrowserError
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