Add swallowedRejection
event to eventually replace multipleResolves
#43165
Labels
feature request
Issues that request new features to be added to Node.js.
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
andPromise.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 toPromise.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?
multipleResolves
? #41554 to be reversed. Obviously, that's not going to happen, so I didn't even bother trying.Promise.*
methods to replace the above ones.The text was updated successfully, but these errors were encountered: