ref(react-router): Deprecate ErrorBoundary exports#18208
Merged
andreiborza merged 1 commit intodevelopfrom Nov 14, 2025
Merged
Conversation
The ErrorBoundary exported in the SDK only works on the client and is not intended to be used. Use react router's error boundary instead: https://docs.sentry.io/platforms/javascript/guides/react-router/#report-errors-from-error-boundaries
| /** | ||
| * @deprecated ErrorBoundaryProps and FallbackRender are deprecated, use react router's error boundary instead. | ||
| * See https://docs.sentry.io/platforms/javascript/guides/react-router/#report-errors-from-error-boundaries | ||
| */ |
There was a problem hiding this comment.
Bug: Deprecation Paradox: API Surface Expansion (Bugbot Rules)
This change introduces new public API exports for ErrorBoundaryProps and FallbackRender types that were not previously exported from this package. While marked as deprecated, adding new exports contradicts the PR's intention to deprecate ErrorBoundary functionality. If these types weren't needed before, exporting them now (even as deprecated) expands the public API surface unnecessarily.
Member
Author
There was a problem hiding this comment.
They were exported before...
logaretm
approved these changes
Nov 14, 2025
s1gr1d
reviewed
Nov 17, 2025
| export { captureReactException, reactErrorHandler, Profiler, withProfiler, useProfiler } from '@sentry/react'; | ||
|
|
||
| /** | ||
| * @deprecated ErrorBoundary is deprecated, use react router's error boundary instead. |
Member
There was a problem hiding this comment.
Suggested change
| * @deprecated ErrorBoundary is deprecated, use react router's error boundary instead. | |
| * @deprecated ErrorBoundary is deprecated, use React Router's error boundary instead. |
Looks a bit more professional if we use the official name in the public exports (same as below)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ErrorBoundary exported in the SDK only works on the client and is not intended to be used.
Use react router's error boundary instead: https://docs.sentry.io/platforms/javascript/guides/react-router/#report-errors-from-error-boundaries.