ErrorBoundary not workling on remix integration
Is there an existing issue for this?
- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- [X] I have reviewed the documentation https://docs.sentry.io/
- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/remix
SDK Version
8.5.0
Framework Version
18.2.0
Link to Sentry event
No response
SDK Setup
No response
Steps to Reproduce
export const ErrorBoundary = () => {
const error = useRouteError();
captureRemixErrorBoundaryError(error);
return <QbNavErrorPage />;
};
export default withSentry(App, {
wrapWithErrorBoundary: true,
errorBoundaryOptions: { fallback: ErrorBoundary },
});
Expected Result
an automatic rerouting when an error is thrown
Actual Result
Nothing
I think using the Remix error boundary as a fallback is not how this option is intended to be used. I'd set wrapWithErrorBoundary: false, and then wrap your react components with ErrorBoundary accordingly.
I think using the Remix error boundary as a fallback is not how this option is intended to be used. I'd set
wrapWithErrorBoundary: false, and then wrap your react components withErrorBoundaryaccordingly.
Hi, thanks for the quick answer.
then wrap your react components with ErrorBoundary accordingly this is unclear to me, can you post a small example?
I think you can just leave the export of the error boundary. Here's an example from our e2e tests: https://github.com/getsentry/sentry-javascript/blob/develop/dev-packages/e2e-tests/test-applications/create-remix-app-v2/app/root.tsx
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀