In captureReactException we set a react context with the raw error.stack:
| returnwithScope(scope=>{ |
| scope.setContext('react',{ componentStack }); |
| returncaptureException(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.
In
captureReactExceptionwe set areactcontext with the rawerror.stack:sentry-javascript/packages/react/src/error.ts
Lines 67 to 70 in 7647e72
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.