Closed thibautguedou3 closed 5 years ago
Hey @thibautguedou3,
I just published a new version (0.1.8
) of the package that now contains the feature, thanks for the suggestion 👍!
Basically, there is a new retryOnNetworkError
boolean option.
If you set it to true, when fetch
throws because of a network error:
1) With the default options the request will be retried
2) You will have access to an extra error
argument in the until
and onRetry
methods
Hope this will suit your needs!
I am trying to implement a use case when a user performs a request without internet. When I use the retry middleware, the retry is not called if the user isOffline. How would you implement it?