mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-24 12:06:54 -05:00
Prevent app from crashing on unhandled rejection
Context: https://github.com/remix-run/remix/issues/9178#issuecomment-2032102431
This commit is contained in:
@@ -178,3 +178,7 @@ if (!global.appStartSignal && process.env.NODE_ENV === "production") {
|
||||
updatePatreonData().catch((err) => console.error(err)),
|
||||
);
|
||||
}
|
||||
|
||||
process.on("unhandledRejection", (reason: string, p: Promise<any>) => {
|
||||
console.error("Unhandled Rejection at:", p, "reason:", reason);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user