adobe / adobe/node-fetch-retry
handle developer errors from callbacks separate from fetch errors
Open
bug
- Dominant language
- JavaScript
- Stars
- 44
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Currently we share the same catch clause for `fetch()` and for the `shouldRetry()` here: https://github.com/adobe/node-fetch-retry/blob/3e512e5a6a892e0bd51c862d8fd1abdbdf1b4c57/index.js#L217-L227
shouldRetry includes calling the callbacks `retryOnHttpError()` and `retryOnHttpResponse()`. These callbacks could have developer errors on which we should not retry blindly.
Instead, we should separate the error handling, and for errors on the callbacks pass them through as clear errors (and do not retry) so the developers can fix their code.
Contributor guide
Assessment
This issue has not been assessed yet.