Access to request data in useFetch's onFetchError hook
dinno7 opened this issue · comments
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
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.