docs: recommend auth interruption APIs in error handling (#99696)
## Summary - Recommend `unauthorized()` for unauthenticated requests and `forbidden()` for authenticated users without access. - Add `Suspense` boundaries around the request-time reads in the existing `notFound()` example and the new authentication example so both patterns work with Cache Components. - Add corresponding `unauthorized` and `forbidden` fallback UI examples and clarify when to use `redirect()` for sign-in flows. - Document eager fallback rendering consistently across the `error.js`, `not-found.js`, `unauthorized.js`, and `forbidden.js` references, with links between the related conventions. This builds on #99689, which stabilizes the authentication interruption APIs. ## Verification - `pnpm prettier --with-node-modules --ignore-path .prettierignore --write docs/01-app/01-getting-started/10-error-handling.mdx docs/01-app/03-api-reference/03-file-conventions/error.mdx docs/01-app/03-api-reference/03-file-conventions/not-found.mdx docs/01-app/03-api-reference/03-file-conventions/forbidden.mdx docs/01-app/03-api-reference/03-file-conventions/unauthorized.mdx` - `pnpm exec eslint --config eslint.config.mjs --fix docs/01-app/01-getting-started/10-error-handling.mdx docs/01-app/03-api-reference/03-file-conventions/error.mdx docs/01-app/03-api-reference/03-file-conventions/not-found.mdx docs/01-app/03-api-reference/03-file-conventions/forbidden.mdx docs/01-app/03-api-reference/03-file-conventions/unauthorized.mdx` - `NO_UPDATE_NOTIFIER=1 pnpm exec alex docs/01-app/01-getting-started/10-error-handling.mdx docs/01-app/03-api-reference/03-file-conventions/error.mdx docs/01-app/03-api-reference/03-file-conventions/not-found.mdx docs/01-app/03-api-reference/03-file-conventions/forbidden.mdx docs/01-app/03-api-reference/03-file-conventions/unauthorized.mdx --quiet` - Not run: framework tests (documentation-only change) <!-- NEXT_JS_LLM -->
Showing
Please
register
or
sign in
to comment