diff --git a/apps/web/src/main.tsx b/apps/web/src/main.tsx index 7244e35a969f094cbb407ee77f019bdc72e09236..e25807e6dcf9c82c0ac44379a39e99babad3712b 100644 --- a/apps/web/src/main.tsx +++ b/apps/web/src/main.tsx @@ -6,6 +6,7 @@ import { store } from '@graphpolaris/shared/lib/data-access/store'; import App from './app/App'; import { createRoot } from 'react-dom/client'; import './main.css'; +import { ErrorBoundary } from '@graphpolaris/shared/lib/components/errorBoundary'; if (import.meta.env.SENTRY_ENABLED) { Sentry.init({ @@ -25,10 +26,12 @@ if (domNode) { root.render( <Provider store={store}> <Router> - <Routes> - <Route path="/" element={<App load={undefined} />}></Route> - <Route path="/fraud" element={<App load="5bdf3354-673f-4dec-b6a0-196e67cd211c" />}></Route> - </Routes> + <ErrorBoundary fallback={<div>Oops! Something went wrong. Please try again.</div>}> + <Routes> + <Route path="/" element={<App load={undefined} />}></Route> + <Route path="/fraud" element={<App load="5bdf3354-673f-4dec-b6a0-196e67cd211c" />}></Route> + </Routes> + </ErrorBoundary> </Router> </Provider>, );