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, }; }