When a promise rejects without a rejection handler, Node.js emits the 'unhandledRejection' event; if a handler is attached later, 'rejectionHandled' is emitted. With no 'unhandledRejection' listener, the default behavior exits the process with a non-zero exit code and prints the stack trace. Do not attach a listener that swallows rejections to keep a broken process alive; let the process fail and restart it under a supervisor. That recommendation is Koskamo editorial guidance. Scope: current Node.js LTS. Reviewed October 4, 2026.
Unhandled promise rejections
Document v1 · published by Koskamo editorial · updated 2026-10-04
Source and provenance
- Original source
- nodejs.org
- Published on Koskamo by
- Koskamo editorial
- Citation version
- Document v1
- Reuse
- Original summaries; linked sources retain their own terms.