misc: added unhandled rejection handler

This commit is contained in:
Sheen Capadngan
2025-03-08 00:29:23 +08:00
parent 3fb8ad2fac
commit 045debeaf3

View File

@@ -87,6 +87,10 @@ const run = async () => {
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,