Skip to content

Clarify that server errors handled by Suspense are still reported#8534

Open
rohan4naik wants to merge 1 commit into
reactjs:mainfrom
rohan4naik:fix/suspense-server-error-recoverable
Open

Clarify that server errors handled by Suspense are still reported#8534
rohan4naik wants to merge 1 commit into
reactjs:mainfrom
rohan4naik:fix/suspense-server-error-recoverable

Conversation

@rohan4naik

Copy link
Copy Markdown

Summary

Fixes #8497.

The "Providing a fallback for server errors and client-only content" section currently states:

if it does not error on the client, React will not display the error to the user since the content was eventually displayed successfully.

This is misleading. Even when the client render succeeds, React still reports the error thrown on the server: it calls onRecoverableError and logs recoverable error #419 to the console (in both dev and prod). As the issue notes, there is no documented way to distinguish an intentional server opt-out from a genuine error.

Changes

  • Clarify that the error is not shown in the UI but is still reported via onRecoverableError and logged to the console.
  • Add a <Note> under the opt-out example explaining the recoverable-error behavior and suggesting throwing a recognizable error that can be filtered in an onRecoverableError handler.

Docs-only change. prettier --check passes.

The 'Providing a fallback for server errors and client-only content'
section stated React would not surface a server error when the client
render succeeds. In practice React still reports it via
onRecoverableError and logs recoverable error reactjs#419 to the console.
Correct the wording and add a note about the opt-out caveat.

Fixes reactjs#8497
Copilot AI review requested due to automatic review settings July 14, 2026 08:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown

Size changes

Details

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Typo]: The mechanism described in "Providing a fallback for server errors and client-only content" behaves differently in practice

2 participants