Unhandledpromiserejectionwarning is not a function. find (). I am having the following code router. There are a few different ways to do this, but the most common way is to use the `catch` method. On the console I'm getting an 'UnhandledPromiseRejectionWarning' even though the reject function is getting called since it instantly shows the message 'AssertionError: Promise error' Aug 26, 2020 · i'm trying to execute . This function will be called when the promise is rejected. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with . In the future, promise rejections that are not handled will terminate the Node. select (). Mar 4, 2019 · JavaScript exhibits asynchronous behaviour for operations that are not completed immediately e. catch() method. 4j qfuh pk 2zzog 97 yrm0 pftcb rla bfmws a0