什么是等效的 Bluebird 承诺错误记录到此:
if (err) {
console.log(err);
res.send(err);
}
为了这:
}).catch(Promise.OperationalError, function(e){
// handle error in Mongoose save findOne etc, res.send(...)
}).catch(function(e){
// handle other exceptions here, this is most likely
// a 500 error where the top one is a 4XX, but pay close
// attention to how you handle errors here
});