Skip to content

Add a shouldRetry option #692

Open
Open
@TheHolyWaffle

Description

@TheHolyWaffle

The default retry options ensure POST requests are not retried. This logic makes sense when the target HTTP server can respond.
However, when there is a network error such as a connection timeout or a DNS resolution that's taking too long, then a TypeError: fetch failed is thrown.

It would be convenient if these "network errors" were retried, regardless of the configured methods and statusCodes in the retry options πŸ™

Refs:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions