-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Error propagation - Original error lost #1925
Comments
Can you provide a self-contained reproduction or a failing test? Are your errors passing the |
Sorry, but it's a project which I can't share it directly. The error is generated from jira.js and Xray GraphQL API clients. Anyway, I've debugged the code to see that your promise callback is getting the error from these APIs, but the condition is not Error instance and not message field exists. I think the problem is that the asyn callback should bypass directly the err, so it's managed by the code. |
I'd recommend looking into why that conditional is failing. It's unconventional to throw or reject with a non-Error object; maybe you can update your code or your dependencies to reject with an |
I'm catching these exceptions and wrapping them with an Error. |
|
Using async retry function some errors are wrapped incorrectly. The error thrown is a string with [object Object], so we're losing original error.
This happens for example with some APIs that are throwing an error with error.errorMessages field and not error.message, as expected by current 3.0.5 async release.
The text was updated successfully, but these errors were encountered: