fixed error logging

This commit is contained in:
Jan Prochazka
2023-01-21 18:00:59 +01:00
parent cc0f05168d
commit d4f0882054
12 changed files with 22 additions and 22 deletions

View File

@@ -347,9 +347,9 @@ function start() {
if (handleProcessCommunication(message)) return;
try {
await handleMessage(message);
} catch (e) {
logger.error('Error in DB connection', e);
process.send({ msgtype: 'error', error: e.message });
} catch (err) {
logger.error({ err }, 'Error in DB connection');
process.send({ msgtype: 'error', error: err.message });
}
});
}