catch errors and set non-zero exit code

Signed-off-by: Johannes Schleifenbaum <johannes@js-webcoding.de>
This commit is contained in:
Johannes Schleifenbaum 2021-06-14 18:56:02 +02:00
parent 150be16cb1
commit 662b06df8e
No known key found for this signature in database
GPG Key ID: 059093B1A278BCD0

View File

@ -117,4 +117,7 @@ if (config.health.healthz.enabled) {
const bot = new Mjolnir(client, protectedRooms, banLists); const bot = new Mjolnir(client, protectedRooms, banLists);
await bot.start(); await bot.start();
})(); })().catch(err => {
logMessage(LogLevel.ERROR, "index", err);
process.exit(1);
});