防护:接口访问限制
This commit is contained in:
+2
-1
@@ -169,7 +169,8 @@ app.configure(ALL_ENVS, 'activity', function () {
|
||||
function errorHandler(err: Error, msg: any, resp: any,
|
||||
session: FrontendOrBackendSession, cb: HandlerCallback) {
|
||||
const errCode = genCode(10);
|
||||
errlogger.error(`${pinus.app.serverId} error handler \n msg[${JSON.stringify(msg)}] \n resp[${JSON.stringify(resp)}] \n sessionId:${JSON.stringify(session.export())} \n error 【${errCode}】 stack: ${err.stack}`);
|
||||
if(err.message != 'globalFilter')
|
||||
errlogger.error(`${pinus.app.serverId} error handler \n msg[${JSON.stringify(msg)}] \n resp[${JSON.stringify(resp)}] \n sessionId:${JSON.stringify(session.export())} \n error 【${errCode}】 stack: ${err.stack}`);
|
||||
|
||||
if (!resp) {
|
||||
resp = resResult(STATUS.GLOBAL_ERR, { errCode, stack: err.stack });
|
||||
|
||||
Reference in New Issue
Block a user