Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
@pi0 Could you please check? I think it's a really flexible solution. |
|
I love this idea. Probably link my issue as well as this should cover that use case too: #355 |
|
@enkot By when can we expect this change to be the part of the release? Is there anything I can give a support for to push it to release? |
|
retryCount will be essential 🙏 |
The PR does not add a new option. It alters an existing one which currently can only be @enkot, thanks for the PR, I too would need this feature. I hope it can get merged. It would likely help if you could resolve the conflicts it has with current code. But maybe it will not entirely cover my use case: an API that may return 401 on Bearer authentication with an access token, and having an endpoint taking refresh tokens for renewing the authentication. With your callback, I could attempt to renew the token |
🔗 Linked issue
resolves #358
resolves #355 (updated)
❓ Type of change
📚 Description
This PR adds support for a callback for
retryoption, which is a function that takes a fetch context object and count of retries and returns a boolean (trueif the request needs to be retried):It runs onError and after a response, so the developer can decide when the request needs to be retried.
📝 Checklist