Files
neuf-www/web/src/instrumentation-client.ts
T

10 lines
284 B
TypeScript

import { reportError } from "@/lib/reportError";
// Errors that no React error boundary catches
window.addEventListener("error", (event) => {
reportError(event.error ?? event.message);
});
window.addEventListener("unhandledrejection", (event) => {
reportError(event.reason);
});