What is the correct way to handle an unhandled promise rejection at process level?
- A Ignore it
- B Listen for 'unhandledRejection', log it, and exit cleanly
- C Automatically retry the promise
- D Convert it to a synchronous error
Answer
Listen for 'unhandledRejection', log it, and exit cleanly
After an unhandled rejection the process state is uncertain. Log for diagnosis and let a supervisor restart the process rather than continuing.





