Repository navigation
docs(www): document dehydrate.shouldRedactErrors for Next.js builds - #8034
Conversation
Pending queries dehydrated during a Next.js build can reject later. Their errors are then redacted before Next reads the digest it uses to detect dynamic rendering, which fails the build. Document the shouldRedactErrors option next to shouldDehydrateQuery in both App Router pages.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
6 Skipped Deployments
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
@trpc/client
@trpc/next
@trpc/openapi
@trpc/react-query
@trpc/server
@trpc/tanstack-react-query
@trpc/upgrade
commit: |
|
This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you. |
What this does
Adds
dehydrate.shouldRedactErrorsto themakeQueryClient()example in the App Router setup and Server Components pages, plus a bullet explaining it.shouldDehydrateQuerydehydrates pending queries so their promise can be streamed. During anext buildthose queries can reject after dehydration, and the error is then redacted before Next.js reads thedigestit uses to detect dynamic rendering — which fails the build. Returningfalsekeeps the digest intact.As the issue notes, Next.js redacts errors itself with better digests.
Notes
next-15integration example.Regression check: n/a, docs only. I could not run
pnpm --filter www check-twoslashhere (no pnpm in this environment); the block is type-checked standalone against theshouldRedactErrors?: (error: unknown) => booleansignature.Prepared with an AI coding agent.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit