Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/node
SDK Version
7.30.0
Framework Version
No response
Link to Sentry event
No response
Steps to Reproduce
Sentry request handler middlware is changing behaviour of unhandledPromise. Without this middleware below
app.use(Sentry.Handlers.requestHandler());
Error with unhandled promise is thrown with unhandledRejection
event which doesn't force node instance to restart.
With middleware above the error is thrown with uncaughtException
event which crashing the node server.
Expected Result
Sentry.Handlers.requestHandler()
middleware should not change behavior of promise errors.
Actual Result
Sentry.Handlers.requestHandler()
middleware is changing promise error behavior