UNPKG

@63pokupki/nodejs-common

Version:
33 lines 924 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const lib_1 = require("@63pokupki/components/lib"); /* LEGO ошибок */ function ErrorSysMiddleware(ctx) { ctx.sys = { apikey: '', srvkey: '', errorSys: null, userSys: null, responseSys: null, logicSys: null, monitoringSys: null, cacheSys: null, accessSys: null, bAuth: false, bSrv: false, bCache: true, }; if (ctx) { ctx.sys.errorSys = new lib_1.ErrorSys(ctx.common.env); if (ctx.common.errorMute) { // Здесь были настройки по игнорировнию ошибок // request.sys.errorSys; } } else { ctx.sys.errorSys = new lib_1.ErrorSys(); } ctx.next(); } exports.default = ErrorSysMiddleware; //# sourceMappingURL=ErrorSysMiddleware.js.map