Skip to content
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

Stacks are being swallowed by improper use of util.error() #3020

Closed
mikeal opened this issue Dec 19, 2019 · 2 comments
Closed

Stacks are being swallowed by improper use of util.error() #3020

mikeal opened this issue Dec 19, 2019 · 2 comments
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

Comments

@mikeal
Copy link

mikeal commented Dec 19, 2019

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 great throw 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.

@mikeal mikeal added the bug This issue is a bug. label Dec 19, 2019
@ajredniwja ajredniwja added feature-request A feature should be added or improved. and removed bug This issue is a bug. labels Dec 23, 2019
@ajredniwja
Copy link
Contributor

Hey @mikeal thank-you for reaching out to us with your issue.

The team also acknowledged that it is frustrating many a times to not have a proper stack trace where it makes it really difficult to debug sometimes.

While I can not certainly talk about when this will be fixed for the current version of the SDK, I can tell you that this is a feature that the team worked on version 3 of the the SDK, which is under developer preview now. You can try JS-SDK-v3 and let us know your reviews about that.

@ajredniwja ajredniwja added the needs-major-version Can only be considered for the next major release label Dec 24, 2019
@github-actions
Copy link

Greetings! We’re closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or open a new issue.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants