You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case there is no way for us to replicate the An error occurred in the <${componentName}> component: message (because componentName is private API), so asking users to add Sentry.reactErrorHandler degrades their local development experience.
I guess we can tell users to only set this for production, but Sentry can also be used in development environments via Spotlight (Sentry for Development).
Is there a way we can get access to the original onUncaughtError handler so we can execute that, while sending the error to Sentry at the same time?
Activity
AbhiPrasad commentedon May 22, 2024
@rickhanlonii The API we're looking to implement for Sentry error monitoring is:
The only thing here is that if you set a
onUncaughtErroroption, it overrides the default, which means you lose out on the dev mode logging:https://github.com/facebook/react/blob/3ac551e855f9bec3161da2fc8787958aa62113db/packages/react-reconciler/src/ReactFiberErrorLogger.js#L36-L51
In this case there is no way for us to replicate the
An error occurred in the <${componentName}> component:message (becausecomponentNameis private API), so asking users to addSentry.reactErrorHandlerdegrades their local development experience.I guess we can tell users to only set this for production, but Sentry can also be used in development environments via Spotlight (Sentry for Development).
Is there a way we can get access to the original
onUncaughtErrorhandler so we can execute that, while sending the error to Sentry at the same time?AbhiPrasad commentedon May 29, 2024
Released with https://github.com/getsentry/sentry-javascript/releases/tag/8.7.0!