1
我在我的项目中使用猫鼬和蓝鸟。这个警告无处不在,即使我纠正了我的所有代码。它仍然发生。蓝鸟和猫鼬:警告:承诺是在处理程序中创建的,但没有从它返回
exports.middleware = function (req, res, next, id) {
Account.findById(id).exec().then(function(account) {
if (!account) {
return res.status(404).send({
message: 'No account with that identifier has been found'
});
}
req.account = account;
next();
}).catch(function(err) {
return next(err);
});
};
这一警告已经更新3.4.3 – Esailija