Stacks are being swallowed by improper use of util.error() #3020
Labels
closed-for-staleness
feature-request
A feature should be added or improved.
needs-major-version
Can only be considered for the next major release
Describe the bug
util.error()
is a nice function you’ve written to bind useful error information to an Error instance. When it’s throw at the same time that it’s called it works greatthrow AWS.util.error(new Error())
but there are several instances in which an error is prepared and then returned to a caller. You can see several of them in this search.When this function is called to prepare an error and then thrown later the stack for the error is captured in the preparation and loses the proper call stack from where the error actually occurs, which makes debugging far more difficult.
Is the issue in the browser/Node.js?
This bug is all over.
SDK version number
Current
master
branch.The text was updated successfully, but these errors were encountered: