Skip to content

Commit

Permalink
chore(web-ui): add unhandled rejection logger (#936)
Browse files Browse the repository at this point in the history
  • Loading branch information
johanbook authored Jul 30, 2024
1 parent b8f79b7 commit c58de57
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions services/web-ui/src/core/logging/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,8 @@ export function registerExceptionLogger(): void {
const error = event.error;
logger.error(event.message, { stackTrace: error.stack });
});

window.addEventListener("unhandledrejection", (event) => {
logger.error("There was an unhandled rejection", { reason: event.reason });
});
}

0 comments on commit c58de57

Please sign in to comment.