Preserve error boundaries in on-demand partial prerenders (#99051)
An on-demand prerender failure still throws when its recovery output requires a resume. This hides the route's error boundary behind a generic error response, even when healthy parts of the page could continue rendering. Failures now retain their original error and serialized postponed state. Self-hosted servers append a separate continuation for each document request. Adapter deployments use the existing platform transport to resume with the actual request. In `next start`, a failed partial prerender follows the same prerender and resume flow as a successful PPR cache miss. Failed preludes are not persisted, so later independent requests retry prerendering before resuming. Concurrent requests can share the pending prerender, and each document request owns its resume. The response retains status 500 and non-cacheable headers. Failed output is not persisted as a successful ISR entry. Build failures and recovery without a usable Flight result continue to throw. The tests cover errors inside and outside Suspense, request-specific dynamic content, navigation after failed prefetches, same-URL recovery, successful-page retention, and original-error reporting.
Showing
This diff is collapsed.
This diff is collapsed.
Please
register
or
sign in
to comment