Skip to content

asyncId for unhandled rejected Promise #37244

Description

@sajal50

Is your feature request related to a problem? Please describe.
I am trying to track the lifecycle events of a Promise. With async_hooks I am able to get those and each Promise is assigned an asyncId. However, I wish to know the asyncId of a Promise that was rejected and didn't have a catch handler attached to it. I see that with there is process.on('unhandledRejection'), but I don't believe that can give that info.

Describe the solution you'd like
A way to be informed of the asyncId for an unhandled Promise.

Activity

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

Metadata

Metadata

Assignees

Labels

async_hooksIssues and PRs related to the async hooks subsystem.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions