From 75e3c8533af8eff9178a298dc06e96c301909ab1 Mon Sep 17 00:00:00 2001 From: Austin Poor <45295232+a-poor@users.noreply.github.com> Date: Sat, 4 Jan 2025 12:55:05 -0800 Subject: [PATCH] Temporarily adds react client side error logging --- app/entry.client.tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app/entry.client.tsx b/app/entry.client.tsx index 608efe2..8719511 100644 --- a/app/entry.client.tsx +++ b/app/entry.client.tsx @@ -23,6 +23,20 @@ startTransition(() => { document, - + , + { + 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); + }, + }, ); });