Skip to content
New issue

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

Access to request data in useFetch's onFetchError hook #3965

Open
4 tasks done
dinno7 opened this issue May 12, 2024 · 0 comments
Open
4 tasks done

Access to request data in useFetch's onFetchError hook #3965

dinno7 opened this issue May 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@dinno7
Copy link

dinno7 commented May 12, 2024

Clear and concise description of the problem

I want to catch all 401 errors inside the onFetchError hook and request to my /refresh endpoint to get new access & refresh tokens and then re-fetch the previous request which caused the 401 error, but there is no information about the previous request inside the onFetchError's context.

Suggested solution

Provide request which caused error inside the onFetchError's context

Alternative

No response

Additional context

No response

Validations

@dinno7 dinno7 added the enhancement New feature or request label May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant