Skip to content

unhandledRejection unconditionally prevents uncaughtExceptionMonitor #41222

Open
@bmeck

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    processIssues and PRs related to the process subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions