Skip to content

Incomplete React Router documentation #9337

@Zwyx

Description

@Zwyx

Core or SDK?

Platform/SDK

Which part? Which one?

JavaScript React

Description

When using React Router v6, setting up Sentry as recommended in the Getting started page is not enough to catch errors: any error happening in a route will be caught by React Router and not transmitted to Sentry.

Note: this only happens when the app is compiled. It does not happen in development mode, because React rethrows errors caught within an error boundary. So, if you test Sentry in development, you might think Sentry works correctly and catches all errors. But once in production, it won't work anymore!

Suggested Solution

The only way I made it work was using a solution provided by another user here.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions