Skip to content

unhandled promise crahing server with sentry middleware #6750

Closed
@modestaspruckus

Description

@modestaspruckus

Is there an existing issue for this?

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

Metadata

Metadata

Assignees

Labels

Package: nodeIssues related to the Sentry Node SDK

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions