...
|
...
|
@@ -8,6 +8,7 @@ const helpers = global.yoho.helpers; |
|
|
const sender = global.yoho.apmSender;
|
|
|
const hostname = require('os').hostname();
|
|
|
const routeEncode = require('./route-encode');
|
|
|
const _ = require('lodash');
|
|
|
|
|
|
const forceNoCache = (res) => {
|
|
|
if (res && !res.finished) {
|
...
|
...
|
@@ -53,7 +54,7 @@ exports.serverError = () => { |
|
|
return (err, req, res, next) => {
|
|
|
forceNoCache(res);
|
|
|
const uid = req.user ? req.user.uid : 0;
|
|
|
const udid = req.query.udid || req.cookies ? req.cookies._yasvd : 0;
|
|
|
const udid = _.get(req, 'cookies.udid', 0);
|
|
|
|
|
|
if (req.isApmReport) {
|
|
|
// 上报服务端错误
|
...
|
...
|
|