diff --git a/backend/src/main.ts b/backend/src/main.ts index 461601fc0..d5c54991b 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -83,6 +83,14 @@ const run = async () => { process.exit(0); }); + process.on("uncaughtException", (error) => { + logger.error(error, "CRITICAL ERROR: Uncaught Exception"); + }); + + process.on("unhandledRejection", (error) => { + logger.error(error, "CRITICAL ERROR: Unhandled Promise Rejection"); + }); + await server.listen({ port: envConfig.PORT, host: envConfig.HOST,