We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Similar logic to how the axios interceptor works. So for any 400 errors, we can refresh the token and send back the original request.
But without access to the original request and request body, this isn't possible.
There seems to be PR #36 open which addresses this, but it hasn't been merged.
Any update if / when this might get done?
The text was updated successfully, but these errors were encountered:
Can delete this issue, created my own solution
Sorry, something went wrong.
@lupes96 can you please share how you solved the problem? Will really appreciate that.
Can you share your solution?
interceptor.response itself can return a Promise of a Response.
interceptor.response
response: (response) => { return fetch("https://my.api/request") .then(apiResp => apiResp.json()) .then((apiData) => { const modifiedResponse = new Response(JSON.stringify(apiData), response); return modifiedResponse }) }
No branches or pull requests
Similar logic to how the axios interceptor works. So for any 400 errors, we can refresh the token and send back the original request.
But without access to the original request and request body, this isn't possible.
There seems to be PR #36 open which addresses this, but it hasn't been merged.
Any update if / when this might get done?
The text was updated successfully, but these errors were encountered: