next.js
a0e2b5dc - Fix prerendering of caught `'use cache'` errors (#100956)

Commit
21 days ago
Fix prerendering of caught `'use cache'` errors (#100956) The error handler records errors thrown inside `'use cache'` functions in the work store's digest lookup. The page renderer uses that lookup to recover original errors for logging (#86500). Prerendering also uses it to detect render failures, so errors caught by the page can still fail the build or on-demand generation. This change collects errors reported by the page's RSC renderer separately and preserves the shared lookup for logging. The regression covers caught errors from `'use cache'` functions during build-time and on-demand prerendering and verifies that the fallback remains cacheable. This follows the reproduction, investigation, and proposed fix in #100841. We need to run deploy tests for this change. Those tests cannot run on fork PRs, so we are opening a branch PR in `vercel/next.js`. Fixes #100829. Closes #100841. Co-authored-by: Ikram-Maulana <hey@ikram.is-a.dev>
Author
Parents
Loading