web: report server and browser errors to Bugsink
This commit is contained in:
10 files changed
+1685
-12
No files matched your search
@@ -0,0 +1,9 @@
|
||||
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);
|
||||
});
|
||||
Reference in new issue
Block a user