Skip to content

feat(crawlers): Add NonRetryableError and RetryRequestError - #2590

Draft
Mantisus wants to merge 4 commits into
apify:v2from
Mantisus:non-retryable-and-retry-request-errors
Draft

Mantisus wants to merge 4 commits into
apify:v2from
Mantisus:non-retryable-and-retry-request-errors

Conversation

@Mantisus

@Mantisus Mantisus commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

A request handler can now decide by itself whether a request is retried. Raising NonRetryableError fails the request at once, skips the error handler and passes the request to the failed request handler. Raising RetryRequestError retries the request even when it has no retries left. Such a retry still increments retry_count, and a request with no_retry set isn't retried.

HttpClientStatusCodeError now extends NonRetryableError, which replaces the dedicated 4xx check, so 4xx responses still fail without a retry. RequestThrottledError stays outside RetryRequestError, because the crawler handles it as an ordinary error when the request manager doesn't pace its domain. Retry tests that duplicated other tests are removed or merged.

Part of #1739.

✍️ Drafted by Claude Code

@Mantisus
Mantisus marked this pull request as draft December 4, 2026 21:01
@Mantisus Mantisus self-assigned this Dec 4, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Dec 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant