-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
feature: Add shouldRetry option #75
Conversation
I've checked the comments on the issue. Here are my thoughts. In
Certainly, using Respecting the code owner's opinion. If you have any additional thoughts, please leave a comment! @sindresorhus |
Not sure I trust this pull request. Your comment is clearly ChatGPT, so I'm going to assume the code changes are too. |
I didn't use GPT to write code, but I used it to write PR because I'm not good at English. If you want to close, you can close. Feel free to give me your opinion. |
You need to add it to the readme too. |
readme.md
Outdated
|
||
Decide if a retry should occur based on the error. Returning true triggers a retry, false aborts with the error. | ||
|
||
shouldRetry is not called for TypeErrors (except network errors) and AbortError. |
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.
shouldRetry is not called for TypeErrors (except network errors) and AbortError. | |
It is not called for `TypeError` (except network errors) and `AbortError`. |
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.
index.d.ts too
is it possible to backport this to v4? |
Referencing #67 and #70, I've added the shouldRetry option.
Please review when you have time.
Fixes #70