Log stack for unhandled errors

This commit is contained in:
Ajay Ramachandran
2021-09-28 09:48:24 -04:00
parent 39baa4871a
commit 3335d54153

View File

@@ -6,6 +6,10 @@ import { startAllCrons } from "./cronjob";
import { getCommit } from "./utils/getCommit";
async function init() {
process.on("unhandledRejection", (error: any) => {
console.dir(error.stack);
});
await initDb();
(global as any).HEADCOMMIT = config.mode === "development" ? "development"
: config.mode === "test" ? "test"