misc: add uncaught exception handler

This commit is contained in:
Sheen Capadngan
2025-03-08 00:22:27 +08:00
parent 58ebebb162
commit 3fb8ad2fac

View File

@@ -83,6 +83,10 @@ const run = async () => {
process.exit(0);
});
process.on("uncaughtException", (error) => {
logger.error(error, "CRITICAL ERROR: Uncaught Exception");
});
await server.listen({
port: envConfig.PORT,
host: envConfig.HOST,