Repository navigation
Make the error page's Retry fetch the page again - #193
Merged
abhishekgahlot2 merged 1 commit intoOct 23, 2026
Merged
Conversation
Retry called reset(), which re-renders the failed segment from what the client already holds. Since a thread that fails to load now throws to this page instead of showing a false 404, a failed server render failed again on every click and the page never recovered. retry() (stable since Next.js 16.3) refreshes from the server first, then re-renders.
Contributor
|
recheck |
|
I have read the CLA Document and I hereby sign the CLA Nickk'z seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. |
Contributor
|
Merged, thanks @coolestnick, Retry actually retries now. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What this changes
The Retry button on the error page (
app/error.tsx) now callsretry()instead ofreset().Why
Since #138, a thread that fails to load throws to this page instead of showing a false 404. But
reset()only re-renders from what the client already holds, so a failed server render failed again on every click and the page never recovered. The console showed React error #441, the production form of a Server Components render error.Next.js 16.3 (the version in
bun.lock) maderetry()stable. It refreshes from the server first, then re-renders, and the Next.js docs recommend it overreset()in most cases.Checks
app/error.test.tsxchecks that Retry callsretry, notreset. It fails on the old code.bun run typecheckpasses. Frontendbun run test1694 pass, 0 fail.bun run lintpasses.bun run buildsucceeds.Screenshot
Not verified
I have not tested recovery in a browser against a failing and then recovering backend. If the backend is still down, Retry shows the same error again; it now actually tries again.
Need help on this PR? Tag
@codesmith-botwith what you need.