Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

What is the correct way to handle an unhandled promise rejection at process level?

  1. A Ignore it
  2. B Listen for 'unhandledRejection', log it, and exit cleanly
  3. C Automatically retry the promise
  4. 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.

All NodeJS MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as