-
-
Notifications
You must be signed in to change notification settings - Fork 981
Add original error property #2010
Copy link
Copy link
Closed
Labels
Description
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 like original that stores the original Error if there was one for example from socks-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
- I have read the documentation and made sure this feature doesn't already exist.
Reactions are currently unavailable