From 91a903881a8ff0db88fde0d39e2d8ff8a844cba4 Mon Sep 17 00:00:00 2001 From: Francisco Date: Mon, 12 Jun 2023 14:16:30 +0200 Subject: [PATCH 1/2] minor fix --- 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 4f8fa7d10e..e4ecaf23c0 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, }; } From 542c45a200df16e30d33fa750e2b837dd4849aec Mon Sep 17 00:00:00 2001 From: Francisco Date: Mon, 12 Jun 2023 14:21:28 +0200 Subject: [PATCH 2/2] minor change --- packages/bridge-ui/src/sentry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bridge-ui/src/sentry.ts b/packages/bridge-ui/src/sentry.ts index e4ecaf23c0..f8dcb3ef7a 100644 --- a/packages/bridge-ui/src/sentry.ts +++ b/packages/bridge-ui/src/sentry.ts @@ -31,7 +31,7 @@ export function setupSentry(dsn: string) { if (error?.cause) { processedEvent.extra = { ...processedEvent.extra, - cause: error?.cause, + cause: error.cause, }; }