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
Handle errors in the interceptor handler #437
Comments
Hi. Have you tried using
|
Yes, it converts the error to a generic Network error, which is not what we are after.
Interesting, this is not what I see, the code never gets to the |
Update: it seems like it's working as expected when I isolated the scenario in a small script. |
My mistake. interceptor.on('request', function ({ request, requestId }) {
return new Promise((resolve, reject) => {
throw error; // not working
reject(error) // good
})
}); |
Following this comment.
Problem: this line throws when an error occurs in the handler.
This prevents the user from handling errors with
error
listener in the request, which causes this test to fail.I think it's because we currently don't
catch
the promise, we only handle thethen
case.The text was updated successfully, but these errors were encountered: