[UnhandledPromiseRejection: 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 .catch(). The promise rejected with the reason "#
If I omit the "err" part and use callbacks, the result is undefined.
I expect the .catch() to actually catch the error. Therefore, I think the compare function itself lacks a catch block in the latest version.
bcrypt version: 5.1.1
When I use bcrypt.compare, even with .then() and .catch(), my server crashes with the following error:
node:internal/process/promises:288 triggerUncaughtException(err, true / fromPromise /); ^
[UnhandledPromiseRejection: 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 .catch(). The promise rejected with the reason "#
If I omit the "err" part and use callbacks, the result is undefined.
I expect the .catch() to actually catch the error. Therefore, I think the compare function itself lacks a catch block in the latest version.