mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 06:28:53 +00:00
20 lines
495 B
TypeScript
20 lines
495 B
TypeScript
const { v4: uuidv4 } = require('uuid');
|
|
|
|
module.exports = {
|
|
name: 'unhandledRejection',
|
|
isDebug: false,
|
|
execute: async (error) => {
|
|
const executionId = uuidv4();
|
|
|
|
const logger = require('../../services/logger').child({
|
|
source: 'unhandledRejection.js',
|
|
module: 'event',
|
|
name: 'unhandledRejection',
|
|
executionId: executionId
|
|
});
|
|
|
|
logger.fatal(error, 'UNHANDLED REJECTION ERROR:');
|
|
return;
|
|
}
|
|
};
|