-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Base exception filter ignores exception cause #13550
Comments
Would you like to create a PR for this issue? |
I have little understanding of what's happening with the error and why message and stack are logged explicitly. I guess the change would require more refactoring than just my simple patch, sorry. |
Hi @micalevisk, @kamilmysliwiec |
I've created a PR #13681 Could you take a look? :) |
Let's track this here #13870 |
Is there an existing issue for this?
Current behavior
The base exception filter (https://github.com/nestjs/nest/blob/master/packages/core/exceptions/base-exception-filter.ts#L72-L75) simply drops any properties on errors other than message and stack, especially
cause
. This is very unfortunate as cause is when provided often crucial to understanding an error.Minimum reproduction code
n/a
Steps to reproduce
No response
Expected behavior
Additional properties, especially
cause
should not simply be ignored, but forwarded to the logger.Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
No response
NestJS version
No response
Packages versions
n/a
Node.js version
No response
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: