pub enum ScrapflyError {
Show 28 variants
Transport(Error),
Json(Error),
Config(String),
BadApiKey,
Api(ApiError),
ApiClient(ApiError),
ApiServer(ApiError),
UpstreamClient(ApiError),
UpstreamServer(ApiError),
TooManyRequests(ApiError),
QuotaLimitReached(ApiError),
ScrapeFailed(ApiError),
ProxyFailed(ApiError),
AspBypassFailed(ApiError),
ScheduleFailed(ApiError),
WebhookFailed(ApiError),
SessionFailed(ApiError),
ScreenshotApiFailed(ApiError),
ExtractionApiFailed(ApiError),
CrawlerFailed(ApiError),
UnhandledApiResponse(ApiError),
CrawlerNotStarted,
CrawlerAlreadyStarted,
CrawlerCancelled,
CrawlerTimeout,
UnexpectedResponseFormat(String),
ContentType(String),
Io(Error),
}Expand description
All errors raised by scrapfly-sdk.
Variants§
Transport(Error)
Transport-level failure (connect, TLS, timeout …).
Json(Error)
JSON (de)serialization failure.
Config(String)
Invalid configuration (builder validation).
BadApiKey
Invalid or empty API key.
Api(ApiError)
Structured API error envelope.
ApiClient(ApiError)
4xx from Scrapfly itself.
ApiServer(ApiError)
5xx from Scrapfly itself.
UpstreamClient(ApiError)
4xx from the upstream target.
UpstreamServer(ApiError)
5xx from the upstream target.
TooManyRequests(ApiError)
Rate limited (HTTP 429).
QuotaLimitReached(ApiError)
Quota exhausted.
ScrapeFailed(ApiError)
Scrape failed with an ERR::SCRAPE::* status.
ProxyFailed(ApiError)
Proxy failure (ERR::PROXY::*).
AspBypassFailed(ApiError)
Anti-bot bypass failure (ERR::ASP::*).
ScheduleFailed(ApiError)
Schedule error.
WebhookFailed(ApiError)
Webhook delivery error.
SessionFailed(ApiError)
Session error.
ScreenshotApiFailed(ApiError)
Screenshot API error.
ExtractionApiFailed(ApiError)
Extraction API error.
CrawlerFailed(ApiError)
Crawler API error.
UnhandledApiResponse(ApiError)
Unhandled API error response.
CrawlerNotStarted
Crawl helper called before start().
CrawlerAlreadyStarted
Crawl::start() called twice.
CrawlerCancelled
Crawl::wait() observed CANCELLED terminal state.
CrawlerTimeout
Crawl::wait() exceeded the caller’s deadline.
UnexpectedResponseFormat(String)
Server returned a content-type the SDK didn’t expect.
ContentType(String)
Invalid content type for this operation.
Io(Error)
I/O failure (example: save screenshot to disk).
Trait Implementations§
Source§impl Debug for ScrapflyError
impl Debug for ScrapflyError
Source§impl Display for ScrapflyError
impl Display for ScrapflyError
Source§impl Error for ScrapflyError
impl Error for ScrapflyError
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<Error> for ScrapflyError
impl From<Error> for ScrapflyError
Source§impl From<Error> for ScrapflyError
impl From<Error> for ScrapflyError
Auto Trait Implementations§
impl Freeze for ScrapflyError
impl !RefUnwindSafe for ScrapflyError
impl Send for ScrapflyError
impl Sync for ScrapflyError
impl Unpin for ScrapflyError
impl UnsafeUnpin for ScrapflyError
impl !UnwindSafe for ScrapflyError
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§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.