How a Rejected Promise Crashed Node.js Before Promise.allSettled()

I recently tracked down a surprisingly awkward Promise bug in a Node.js app. At first it looked inconsistent. Sometimes a failed async operation was handled exactly how I expected by Promise.allSettled(). Other times Node would crash with an unhandled rejection. The confusing part was that it only happened in one very specific shape of work. If a single async job was triggered, Promise.allSettled() caught the failure just fine. But if that same first job failed and there was also a second job to prepare, the process could crash before Promise.allSettled() was ever reached. ...

March 17, 2026 · 4 min