refs #4823 New error handler

This commit is contained in:
Guillermo Bonet 2023-06-30 07:47:19 +02:00
parent f3d9ad8ff0
commit 17e3e4dfbf
1 changed files with 2 additions and 1 deletions

View File

@ -59,7 +59,8 @@ class Floriday {
await utils.separator(`${cycle++} ${(cycle == 2 ? 'Cycle' : 'Cycles')}`);
} catch (err) {
if (err?.original?.code === 'ER_SOCKET_UNEXPECTED_CLOSE') throw err;
if (err?.original?.code === 'ER_SOCKET_UNEXPECTED_CLOSE' || (err?.message).substring(0, 24) === 'SequelizeConnectionError')
throw err;
utils.handler('critical', err);
}
};