Answers for "(node:3868) UnhandledPromiseRejectionWarning: Error: You must call `"

0

(node:3868) UnhandledPromiseRejectionWarning: Error: You must call `

new Promise((resolve, reject) => {
  setTimeout(() => reject('woops'), 500);
});

/* Output:
$ node test.js
(node:8128) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): woops
(node:8128) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. */
Posted by: Guest on July-27-2021

Code answers related to "(node:3868) UnhandledPromiseRejectionWarning: Error: You must call `"

Browse Popular Code Answers by Language