Skip to content

Add swallowedRejection event to eventually replace multipleResolves #43165

@dead-claudia

Description

@dead-claudia

What is the problem this feature will solve?

I need to be able to capture and log errors that are swallowed by the likes of Promise.all and Promise.race. multipleResolves currently fills that gap, but #41554 is deprecating the hook as it didn't really pan out.

What is the feature you are proposing to solve the problem?

A swallowedRejection hook fired any time a source promise to Promise.all/Promise.race rejects after the returned promise settles. This would not fire on multiple resolutions, avoiding performance impact there.

What alternatives have you considered?

  1. Pushing for Deprecate multipleResolves? #41554 to be reversed. Obviously, that's not going to happen, so I didn't even bother trying.
  2. Getting new Promise.* methods to replace the above ones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions