When running a unit test on a typescript service I am seeing this warning:
(node:79377) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): [object Object]
What does node:
tell me? Also, what does rejection id:
tell me?
--NOTE--
My question is not how to find the unhandled promise, but what the "numbers" in the warning communicate.
(node:79377)
is node
PID (process ID) https://github.com/nodejs/node/blob/master/lib/internal/process/warning.js#L4
rejection id
is id of rejected Promise
https://github.com/nodejs/node/blob/master/lib/internal/process/promises.js#L40 grab Promise ID
https://github.com/nodejs/node/blob/master/lib/internal/process/promises.js#L63 generate warning/error
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.