-
-
Notifications
You must be signed in to change notification settings - Fork 938
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
Add original error property #2010
Comments
Yeah, we should use |
@sindresorhus If the original error goes under a |
If we just add a new property, it won't be included in the |
If nothing would break for people using Node 15 then maybe |
Its Node 16 time 😎 |
What problem are you trying to solve?
@szmarczak asked me to create a separate issue (#1865 (comment)).
Could you add a property on the
got
Error object likeoriginal
that stores the original Error if there was one for example fromsocks-proxy-agent
? It would really help with more involved error handling scenarios.Describe the feature
More background is at #1865.
The
cause
property could be used https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#differentiate_between_similar_errors since it is standard.Checklist
The text was updated successfully, but these errors were encountered: