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

Optionally disable error handling #74

Merged

Conversation

silverbackdan
Copy link
Contributor

In relation to issue here: #73

It's be very helpful to simply disable this response interceptor that handles errors. On SSR I'd like to be able to try and refresh a JWT token before displaying a 403 page or whatever custom logic.

I can add documentation if you think this is OK?

@pi0
Copy link
Member

pi0 commented Jul 19, 2017

@silverbackdan Thanks :) There is another problem remaining for general usage. "Unhandled SSR rejections" However it's okey adding an option entirely disable error handlers, my suggestion is adding another option just returning error instead of throw rejections. What's your idea?
PS: Let me know when PR was ready to merge if you want to add some docs :)

@silverbackdan
Copy link
Contributor Author

Cool, I'll add some docs in a short while.

Re: "Unhandled SSR rejections" - is there an Issues raised about this one? Just to clarify, is the idea for another option to simply output a nuxt error page as it does at the moment anyway with this error handler on a SSR axios request, but also to make that part optional so that if an option is changed a user can also get a promise error (same as currently on client-side)?

@silverbackdan
Copy link
Contributor Author

Docs added now. Please do mod if you think any minor changes are needed to make any info clearer. Thanks for your quick responses as always @pi0

@pi0
Copy link
Member

pi0 commented Jul 24, 2017

Thanks! I will disable error handler by default too as it seems to be annoying for users using this first time.

@pi0 pi0 merged commit a195feb into nuxt-community:master Jul 24, 2017
@silverbackdan silverbackdan deleted the patch-1-axios-optional-error-handling branch July 24, 2017 09:12
NicoPennec pushed a commit to NicoPennec/modules that referenced this pull request Aug 2, 2017
* Optionally disable error handling

* Docs for handleErrors option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants