vueuse / vueuse

Collection of essential Vue Composition Utilities for Vue 2 and 3

Home Page:https://vueuse.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Access to request data in useFetch's onFetchError hook

dinno7 opened this issue · comments

commented

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