next.js
aaddf4d0 - docs: explain errors thrown inside use cache (#102064)

Commit
7 hours ago
docs: explain errors thrown inside use cache (#102064) ### What? Document how errors thrown inside `use cache` lose their custom class and fields, even when caught on the server. ### Why? Callers that branch on custom error classes can mistake expected failures for unexpected errors. Production also redacts the original name and message. ### How? Add a short subsection explaining the boundary, digest correlation with server logs, and returning a serializable result for expected failures. ### Verification - Prettier and ESLint pass for the changed MDX file. - `alex` reports only the existing warning on line 144. - Checked the current cache wrapper and React error reconstruction paths. No runtime tests run (documentation only). <!-- NEXT_JS_LLM -->
Author
Parents
Loading