-
-
Notifications
You must be signed in to change notification settings - Fork 16.4k
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
Error cause
is not displayed
#5630
Error cause
is not displayed
#5630
Comments
Hey @OliverJAsh, thanks for the report. The specification for error causes is comparatively new to the code which handles this and the error stack is what we use for displaying this. I do agree though that showing error causes for development logging would be an awesome improvement. Feel free to open a PR for this one. |
Hii @OliverJAsh thanks for the report. can you able to compile this enhancement? |
hey, i want to contribute to this enhancement. there is any way to connect this issue to me? |
Hey @DanielBelz1997, we would love a PR for this. The stack trace behavior comes from |
thanks for the quick reply! i will get right into it |
fixed the issue. but the code is in the finalHandler package. how should i do a PR on this? |
Open a PR to |
I created a small reproduction/test for this 👀 |
This is a replacement for pillarjs#49. I just pulled out the specific change related to this issue and added it here. Closes: expressjs/express#5630
I have a review out on both of these PRs. Whoever gets theirs into a fixed up state I will merge and publish. Closing this to track work on this in the respective PRs. |
This is a replacement for pillarjs#49. I just pulled out the specific change related to this issue and added it here. Closes: expressjs/express#5630 test: Error w/ cause case fix: recursively find Error.cause stacks Remove the error.stack logic as it is redundant test: check for both 1 level & 2 level Error.cause refactor: use native util.format() API for Error printing fix: put back original lines of code test: update tests to be less brittle
package.json
:server.js
:$ curl "localhost:3000"
Actual
The error
cause
is not displayed.Expected
The error
cause
should be displayed, like it is for exceptions occurring outside of request handlers.The text was updated successfully, but these errors were encountered: