Skip to content

Commit

Permalink
Fire analytics for uncaught error (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
choden-dev authored Jun 29, 2024
1 parent 34aa15e commit 86766f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { AllRoutes } from "./routes/routes"
import { AppNavbar } from "components/composite/Navbar/AppNavbar"
import { ErrorBoundary } from "react-error-boundary"
import RefreshNotification from "pages/RefreshNotification/RefreshNotification"
import { fireAnalytics } from "firebase"

function App() {
return (
Expand All @@ -15,6 +16,7 @@ function App() {
<ErrorBoundary
fallback={<RefreshNotification />}
onError={() => {
fireAnalytics("exception", { event_label: "uncaught exception" })
window.location.reload()
}}
>
Expand Down

0 comments on commit 86766f5

Please sign in to comment.