diff --git a/frontend/src/ts/ready.ts b/frontend/src/ts/ready.ts index 9554990b7963..b19e2b201284 100644 --- a/frontend/src/ts/ready.ts +++ b/frontend/src/ts/ready.ts @@ -105,12 +105,24 @@ $(document).ready(() => { }); window.onerror = function (message, url, line, column, error): void { + if (Misc.isDevEnvironment()) { + Notifications.add(error?.message ?? "Undefined message", -1, { + customTitle: "DEV: Unhandled error", + duration: 5, + }); + } void log("error", { error: error?.stack ?? "", }); }; window.onunhandledrejection = function (e): void { + if (Misc.isDevEnvironment()) { + Notifications.add(e.reason.message, -1, { + customTitle: "DEV: Unhandled rejection", + duration: 5, + }); + } void log("error", { error: e.reason.stack ?? "", });