-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
React: Don't set react.componentStack context #20094
Copy link
Copy link
Open
Description
In captureReactException we set a react context with the raw error.stack:
sentry-javascript/packages/react/src/error.ts
Lines 67 to 70 in 7647e72
| return withScope(scope => { | |
| scope.setContext('react', { componentStack }); | |
| return captureException(error, hint); | |
| }); |
This context will never have sourcemaps applied so it will be mostly useless to users. For React >= v17 the stack also gets included in the error and will have sourcemaps applied.
A user has asked why this context is set and I can't see a valid reason for it.
It might offer some context for React < v17 but it seems unlikely without sourcemaps.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Fields
Give feedbackNo fields configured for issues without a type.