-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
Unclear how to throw an actual error #579
Comments
I figured it out - see #566 For anyone else coming across this, you must attach an interceptor.on('unhandledException', ({ error, request, requestId, controller }) => { throw error; }); I suppose the issue still stands that this was not clear, as it it does not seem to be documented. I will try to find some time to open a PR. |
Hi, @theoephraim. That's certainly an oversight on my end. Please, could you open a PR that adds a new section called "Error handling" after this block in the readme? It would be great to mention the following things in that new section:
|
Released: v0.30.1 🎉This has been released in v0.30.1! Make sure to always update to the latest version ( Predictable release automation by @ossjs/release. |
It seems all errors thrown in an interceptor are swallowed and turned into a request responses.
What if I actually just want to cancel the request altogether and throw an error? Is that even possible? I did some digging in the source and the docs but couldn't quite figure it out.
Thanks!
The text was updated successfully, but these errors were encountered: