lib,src: exit process on unhandled promise rejection cleanup by Fishrock123 · Pull Request #12010 · nodejs/node (original) (raw)

We should crash by default in the absence of user-installed unhandledRejection handlers. This is a controversial stance (some notable promise-users disagree with me!), but I believe it's the best solution for Node's users in the long run. I will describe why I think this is a good behavior first, followed by why I think it's valid route for Node to take.

Crashing on unhandled rejection is a valid path:

I don't think we should move forward with crash-on-GC as a default behavior. As a habitual promise user, it worries me:

As someone who develops & deploys production promise-based services, I would hesitate before migrating to a version of node that included crash-on-GC behavior by default. As a former Node CTC member, I'd advise caution before taking onboard the complexity of introducing it as a debugging tool.