Document route handler prerender interruptions - #96980
Draft
DavidIlie wants to merge 1 commit into
Draft
Conversation
Contributor
Stats skippedCommit: 1a5a9e1 |
Contributor
Tests PassedCommit: 1a5a9e1 |
DavidIlie
force-pushed
the
codex/route-handler-bailout-docs
branch
from
August 8, 2026 23:01
76eb19d to
cf41e17
Compare
DavidIlie
force-pushed
the
codex/route-handler-bailout-docs
branch
from
August 8, 2026 23:10
1f95aeb to
1a5a9e1
Compare
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.
What?
Documents how broad error handling in Cache Components
GETRoute Handlers should preserve framework-controlled prerender interruptions.Adds TypeScript and JavaScript examples that call
unstable_rethrow(error)before application error handling, and distinguishes that behavior fromexperimental.hideLogsAfterAbort.Why?
Request-bound and uncached reads intentionally throw while Next.js prospectively executes a
GEThandler during the build. An existingtry/catchcan intercept that signal, log a scary-looking error, and make an expected dynamic opt-out look like a failed build.The migration guide currently mentions log suppression but does not directly connect this Route Handler behavior to
unstable_rethrow. Log suppression changes visibility only; it does not preserve framework control flow in a catch block that otherwise handles every error.How?
Shows
request.nextUrl.searchParamsinside a mixed application error handler and placesunstable_rethrowat the top of the catch. The surrounding text explains what each mechanism does.Stack
Stacked on #96979, which removes the redundant second prospective execution when dynamic access was already recorded.
Verification
npx eslint --config eslint.config.mjs docs/01-app/02-guides/migrating-to-cache-components.mdx