2988220
You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
const rp=require('request-promise');
rp(...).then(...).catch(...).finally(function () {
// This is called after the request finishes either successful or not successful.
return res.send(_objResult);//这句偶尔会报错
});
上面那段是一个公共方法,我封装成了一个ApiCall,大部分都会走这个函数,有没可能是并发导致一个请求还未发送出去另一个请求又进来了?请大神帮忙看下~
QQ 617284237