-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
We used to retry on all thrown http errors:
Line 29 in 4161e43
| (error !== null || (retryOptions.retryOnHttpResponse && (retryOptions.retryOnHttpResponse(response)))) |
Then when we refactored the code, the behavior changed and only retried on error.code 5xx which brought in this regression: #60
To be more thorough, we added a customizable function called retryOnHttpError and changed the default to retry on all FetchErrors: #63
The goal now is to expand the behavior (in addition to this change: #87) to call retryOnHttpError for all thrown errors, not just FetchError. This will make it easier to implement to make node-fetch-retry pluggable: #86
Developers can still use the custom retryOnHttpError function to add special behavior, like only retrying on FetchError's.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request