From 08baec00cfdc235c0baf3d139a8a62df6e34e914 Mon Sep 17 00:00:00 2001 From: Francisco Ramos Date: Mon, 12 Jun 2023 14:43:32 +0200 Subject: [PATCH] fix(bridge-ui): fix issue in beforeSend (#13971) --- packages/bridge-ui/src/sentry.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/bridge-ui/src/sentry.ts b/packages/bridge-ui/src/sentry.ts index 4f8fa7d10ef..f8dcb3ef7a6 100644 --- a/packages/bridge-ui/src/sentry.ts +++ b/packages/bridge-ui/src/sentry.ts @@ -25,13 +25,13 @@ export function setupSentry(dsn: string) { beforeSend(event, hint) { const processedEvent = { ...event }; - const { cause } = hint?.originalException as Error; + const error = hint?.originalException as Error; // If we have "cause", we want to know about it as additional data - if (cause) { + if (error?.cause) { processedEvent.extra = { ...processedEvent.extra, - cause, + cause: error.cause, }; }