-
Notifications
You must be signed in to change notification settings - Fork 129
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
Interceptor support? #19
Comments
up it will be so useful, could use it instead of axios |
In Nuxt3, it is no longer possible to pass arbitrary fetches to useFetch. This will be an obstacle to migration for users who used to use @nuxtjs/composition-api's useFetch in combination with axios. It would be nice if something like the axios interceptor could be implemented in ohmyfetch as well. |
@ushironoko The version that allows you to pass arbitrary fetches is called |
Just added a basic set of interceptors. Docs. ideas more than welcome to improve. |
Looks like a very flexible API. Thanks! |
How can I catch only specific error and return a success response? I want to intercept "not found error". Call function in component
After response I see The documentation shows how to log errors, but it doesn't say how to intercept I would like to process only those errors that match the condition and skip the rest further as in axios. Now I see that you are suggesting to handle all errors |
Hi,
is this have interceptors?
Thanks,
The text was updated successfully, but these errors were encountered: