next.js
b4a4c055 - docs: use auth interruption APIs in examples (#99698)

Commit
8 days ago
docs: use auth interruption APIs in examples (#99698) ## Summary - Replace generic `Unauthorized` and `Forbidden` errors with the stable `unauthorized()` and `forbidden()` APIs across the mutating data, forms, Server Actions, data security, and `use server` documentation. - Distinguish unauthenticated requests from authenticated users who lack permission in the security examples. - Link to the API references and explain that the functions render the matching fallback files. This PR is stacked on #99696, which adds the complete pattern to the error-handling guide. ## Verification - `pnpm prettier --with-node-modules --ignore-path .prettierignore --write docs/01-app/01-getting-started/07-mutating-data.mdx docs/01-app/02-guides/data-security.mdx docs/01-app/02-guides/forms.mdx docs/01-app/02-guides/server-actions.mdx docs/01-app/03-api-reference/01-directives/use-server.mdx` - `pnpm exec eslint --config eslint.config.mjs --fix docs/01-app/01-getting-started/07-mutating-data.mdx docs/01-app/02-guides/data-security.mdx docs/01-app/02-guides/forms.mdx docs/01-app/02-guides/server-actions.mdx docs/01-app/03-api-reference/01-directives/use-server.mdx` - `NO_UPDATE_NOTIFIER=1 pnpm exec alex docs/01-app/01-getting-started/07-mutating-data.mdx docs/01-app/02-guides/data-security.mdx docs/01-app/02-guides/forms.mdx docs/01-app/02-guides/server-actions.mdx docs/01-app/03-api-reference/01-directives/use-server.mdx --quiet` - Not run: framework tests (documentation-only change) <!-- NEXT_JS_LLM -->
Author
Parents
Loading