-
Notifications
You must be signed in to change notification settings - Fork 615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add RetryRequestError
+ add error to the context for BC
#1443
feat: add RetryRequestError
+ add error to the context for BC
#1443
Conversation
@@ -33,6 +33,7 @@ import { | |||
Statistics, | |||
purgeDefaultStorages, | |||
validators, | |||
RetryRequest, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't noticed before, but shouldn't this be named RetryableError
or RetryRequestError
or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, should be *Error
to make sure people understand its something to throw, not to return.
I do like RetryRequestError
name better, but would go with RetryableError
as its consistent with NonRetryableError
we already have.
@@ -33,6 +33,7 @@ import { | |||
Statistics, | |||
purgeDefaultStorages, | |||
validators, | |||
RetryRequest, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, should be *Error
to make sure people understand its something to throw, not to return.
I do like RetryRequestError
name better, but would go with RetryableError
as its consistent with NonRetryableError
we already have.
Co-authored-by: Martin Adámek <banan23@gmail.com>
Co-authored-by: Martin Adámek <banan23@gmail.com>
RetryRequestError
+ add error to the context for BC
The PR adds the error to the crawling context for the error handlers.
Since you can throw anything, the correct type for errors in the error handlers is unknown instead of
Error
, so this PR fixes that too.