Closed
Description
-
What version of bluebird is the issue happening on?
3.5.0 -
What platform and version? (For example Node.js 0.12 or Google Chrome 32)
Node.js 8.0.0 on Ubuntu -
Did this issue happen with earlier version of bluebird?
Yes
When returning Promise.reject in async function, an error is printed on the console "Unhandled rejection" even the promise is caught. It doesn't print out the error if native Promise is used.
const Promise = require("bluebird");
async function WaitAsync(){
return Promise.reject(new Error("reject"));
}
Promise.resolve().then(() => {
return WaitAsync();
}).catch(err => {
console.log("caught: ", err);
});