Concept Flow - Unhandled rejection handling
Promise created
Promise rejected?
No→Promise resolved, normal flow
Yes
Is rejection handled?
Yes→Handle rejection with .catch() or try/catch
No
Node.js emits 'unhandledRejection' event
Optional process exit or logging
Program continues or stops
This flow shows how Node.js handles promises that reject without a catch handler, emitting an event if unhandled.