next.js
0f35dab6 - Improve notFound recovery in error pathway (#94037)

Commit
1 day ago
Improve notFound recovery in error pathway (#94037) Effectively Relands #93988 Reverts #92231 Prerendering the notFound loaderTree turns out to not be the correct behavior in many cases. The original motivation of 92231 as to solve the connection closed problem caused by statically prerendering an incomplete HTTP event like notFound() when cacheComponents is enabled because it would leave holes in the inlined flight data that never resolved and led to reported errors on hydration. This change now continues to fork the CC behavior of the error handler but it treats the error page as a resumable page so fresh hydration data is generated if it wasn't able to be entirely static. This is good for correctness but it also means the page is not going to statically prerender the notFound UI. This will be handled in a followup --------- Co-authored-by: Hendrik Liebau <mail@hendrik-liebau.de>
Author
Parents
Loading