From 5a1926439b2cbae6622650caa63bcc2fafe74dba Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Fri, 18 Dec 2020 05:07:55 +0200 Subject: [PATCH] Pass unhandled rejections to main error handler --- backend/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/index.ts b/backend/src/index.ts index bac28fcd..033b21d8 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -107,6 +107,7 @@ if (process.env.NODE_ENV === "production") { }; process.on("uncaughtException", errorHandler); + process.on("unhandledRejection", errorHandler); } // Verify required Node.js version