We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 376fd84 commit 3f20681Copy full SHA for 3f20681
1 file changed
packages/nextjs/src/app-router/server/utils.ts
@@ -56,7 +56,7 @@ export const isNextjsUseCacheError = (e: unknown): boolean => {
56
export const USE_CACHE_ERROR_MESSAGE =
57
`Clerk: auth() and currentUser() cannot be called inside a "use cache" function. ` +
58
`These functions access \`headers()\` internally, which is a dynamic API not allowed in cached contexts.\n\n` +
59
- `To fix this, call auth() outside the cached function and pass the userId as an argument:\n\n` +
+ `To fix this, call auth() outside the cached function and pass the values you need as arguments:\n\n` +
60
` import { auth, clerkClient } from '@clerk/nextjs/server';\n\n` +
61
` async function getCachedUser(userId: string) {\n` +
62
` "use cache";\n` +
0 commit comments