Skip to content

Commit

Permalink
fix: вернуть глобального ловца ошибок
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyKardashev committed Nov 17, 2023
1 parent 2a73006 commit f8bca66
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions backend/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ const { requestLogger, errorLogger } = require('./middlewares/logger');
const limiter = require('./utils/limiter');

// IN CASE THERE IS AN ERROR THAT HASN'T BEEN HANDLED
// process.on('uncaughtException', (err, origin) => {
// // eslint-disable-next-line no-console
// console.log(`ОЙ ${origin} ${err.name} c текстом ${err.message} не была обработана. Сработал глобальный обработчик ошибок.`);
// });
process.on('uncaughtException', (err, origin) => {
// eslint-disable-next-line no-console
console.log(`ОЙ ${origin} ${err.name} c текстом ${err.message} не была обработана. Сработал глобальный обработчик ошибок.`);
});

const { PORT = 3000, NODE_ENV, DB_URL = 'mongodb://127.0.0.1:27017/mestodb' } = process.env;

Expand Down

0 comments on commit f8bca66

Please sign in to comment.