Skip to content

Commit

Permalink
Temporarily adds react client side error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
a-poor committed Jan 4, 2025
1 parent 09bc18c commit 75e3c85
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion app/entry.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ startTransition(() => {
document,
<StrictMode>
<HydratedRouter />
</StrictMode>
</StrictMode>,
{
onCaughtError: (error, errorInfo) => {
console.error('Caught error:', error, errorInfo);
Sentry.captureException(error);
},
onUncaughtError: (error, errorInfo) => {
console.error('Uncaught error:', error, errorInfo);
Sentry.captureException(error);
},
onRecoverableError: (error, errorInfo) => {
console.error('Recoverable error:', error, errorInfo);
Sentry.captureException(error);
},
},
);
});

0 comments on commit 75e3c85

Please sign in to comment.