From 6159436d7b9577bd17608a7260ac078460375308 Mon Sep 17 00:00:00 2001 From: Harshit Singh Date: Wed, 8 Apr 2026 15:36:18 +0530 Subject: [PATCH] fix(react): Remove unnecessary withScope wrapper in captureReactException --- packages/react/src/error.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/react/src/error.ts b/packages/react/src/error.ts index c10cebe4ecf4..ae4913db8620 100644 --- a/packages/react/src/error.ts +++ b/packages/react/src/error.ts @@ -1,4 +1,4 @@ -import { captureException, withScope } from '@sentry/browser'; +import { captureException } from '@sentry/browser'; import { isError } from '@sentry/core'; import type { ErrorInfo } from 'react'; import { version } from 'react'; @@ -64,10 +64,7 @@ export function captureReactException( setCause(error, errorBoundaryError); } - return withScope(scope => { - scope.setContext('react', { componentStack }); - return captureException(error, hint); - }); + return captureException(error, hint); } /**