-
Notifications
You must be signed in to change notification settings - Fork 753
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
Errors miss useful stack traces #1707
Comments
To leave some notes on a proposed fix, I think the issue is that async stack traces don't work due to use of stripe-node/src/RequestSender.ts Lines 144 to 152 in 3dc8c54
One solution is to save the original stack trace when the call is made via |
Hi, thanks for submitting a bug report! I'm going to close this issue as a duplicate of #1542, where this problem is being tracked. #1066 also raises this issue, and the discussion there gives workarounds there that might work for you in the meantime.
The overhead from constructing stack traces is a definitely a concern here - we'd like to approach supporting async stack traces by actually converting our logic to be async, which is more than a quick fix. |
Describe the bug
When using
stripe-node
, API errors seem to lose the full stack trace, making it hard to debug and find the code that triggered a particular error.For instance, if I make a bad
customers.retrieve()
call (with an invalid customer ID), I get an error with the following stack trace:To Reproduce
customers.retrieve
Expected behavior
I'd expect the stack trace to contain the stack up to where the Stripe API request was made. Instead, I only get a partial internal stack.
Code snippets
No response
OS
macOS
Node version
Node v16.17.1
Library version
11.7.0
API version
2022-11-15
Additional context
See also: #118
The text was updated successfully, but these errors were encountered: