Skip to content

Add and change default OnUnhandledRejection mode to throw to match Node.js #21151

@mohd-akram

Description

@mohd-akram

Problem Statement

The default mode changed in Node.js to throw (raise an error unless 'unhandledRejection' hook is set) in Node.js 15. The current default in Sentry, warn, shows a confusing and outdated message.

Solution Brainstorm

To implement throw mode, check if the user had previously set an unhandledRejection handler. If they did, throw and exit, otherwise print the warning.

Additional Context

The current strict mode also does not behave like Node.js. It should not print the warning message, but rather exit immediately.

Priority

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    Status
    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions