ваше сообщение коммита
This commit is contained in:
@@ -5,13 +5,12 @@ const { ERROR_CODES } = require('../utils/constants');
|
||||
/**
|
||||
* Middleware для обработки ошибок
|
||||
*/
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const errorHandler = (err, req, res, /* next */) => {
|
||||
const errorHandler = (err, req, res, next) => {
|
||||
console.log('errorHandler called, arguments:', arguments);
|
||||
console.log('typeof res:', typeof res, 'isFunction:', typeof res === 'function');
|
||||
console.error('errorHandler: err =', err);
|
||||
console.error('errorHandler: typeof err =', typeof err);
|
||||
console.error('errorHandler: stack =', err && err.stack);
|
||||
console.log('errorHandler called, typeof res:', typeof res, 'res:', res);
|
||||
console.log('typeof res:', typeof res, 'isFunction:', typeof res === 'function');
|
||||
// Логируем ошибку
|
||||
logger.error(`Error: ${err.message}`, {
|
||||
stack: err.stack,
|
||||
|
||||
Reference in New Issue
Block a user