Skip to content

unhandledRejection unconditionally prevents uncaughtExceptionMonitor #41222

Description

@bmeck

Version

No response

Platform

No response

Subsystem

process

What steps will reproduce the bug?

process.on('unhandledRejection', (err) => {console.trace('unhandledRejection', err);});
process.on('uncaughtExceptionMonitor', (err) => {console.trace('uncaughtExceptionMonitor', err);});
Promise.reject(new Error('from promise'));

How often does it reproduce? Is there a required condition?

Always

What is the expected behavior?

There is some way to see the error in 'uncaughtExceptionMonitor', throwing inside of unhandledRejection converts the type to uncaughtException and loses context.

What do you see instead?

If you register unhandledRejection there is no way to get the default behavior of seeing it in uncaughtExceptionMonitor, it is completely prevented with no way to opt-out.

Additional information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    processIssues and PRs related to the process subsystem.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions