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
We've been trying to hook up https://www.bugsnag.com/ to log errors from within the React app, but can't get it to work with the server-side rendering. Would really appreciate any advice on implementing this.
The bugsnag-react library (https://docs.bugsnag.com/platforms/browsers/react/) works by letting you wrap the App in a component, but creating the ErrorBoundary component seems to rely on the bugsnag function provided by bugsnag-js. The problem is that this function seems to rely on accessing window. This means that while we can wrap ClientApp (from app.js) in the ErrorBoundary, we can't wrap ServerApp.
Ultimately we're looking for a way to catch any and all errors from within React and log them to Bugsnag. I think we could use the existing log file written to support Raven, but that relies on calling .error() whenever we want to log an error, whereas the ErrorBoundary implementation catches all errors.
The text was updated successfully, but these errors were encountered:
Side note: Current Sentry setup catches unhandled exceptions, we just decided to add error reporting to steps that matter (mainly to transaction process). We felt that reporting all the errors "as-is" is probably too noisy (i.e. we wanted to organize important errors with keywords like update-listing-failed).
We've been trying to hook up https://www.bugsnag.com/ to log errors from within the React app, but can't get it to work with the server-side rendering. Would really appreciate any advice on implementing this.
The bugsnag-react library (https://docs.bugsnag.com/platforms/browsers/react/) works by letting you wrap the App in a component, but creating the ErrorBoundary component seems to rely on the bugsnag function provided by bugsnag-js. The problem is that this function seems to rely on accessing
window
. This means that while we can wrap ClientApp (from app.js) in the ErrorBoundary, we can't wrap ServerApp.Ultimately we're looking for a way to catch any and all errors from within React and log them to Bugsnag. I think we could use the existing log file written to support Raven, but that relies on calling .error() whenever we want to log an error, whereas the ErrorBoundary implementation catches all errors.
The text was updated successfully, but these errors were encountered: