Authored by 邱骏

增加请求失败返回

... ... @@ -139,8 +139,13 @@ const redpac = {
return res.json(result || {});
}).catch(e => {
console.log('error:', e);
console.log('MyError:', e);
res.json(Object.assign({
code: 400,
message: '请求失败,请重试'
}, e));
sendMessage(0, {}, {message: e.message || 'interface error', stack: e}, 1);
next();
});
},
... ...