Skip to content

Commit 3f20681

Browse files
jacekradkoEphem
andauthored
Update packages/nextjs/src/app-router/server/utils.ts
Co-authored-by: Fredrik Höglund <fredrik@clerk.dev>
1 parent 376fd84 commit 3f20681

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/nextjs/src/app-router/server

packages/nextjs/src/app-router/server/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const isNextjsUseCacheError = (e: unknown): boolean => {
5656
export const USE_CACHE_ERROR_MESSAGE =
5757
`Clerk: auth() and currentUser() cannot be called inside a "use cache" function. ` +
5858
`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` +
59+
`To fix this, call auth() outside the cached function and pass the values you need as arguments:\n\n` +
6060
` import { auth, clerkClient } from '@clerk/nextjs/server';\n\n` +
6161
` async function getCachedUser(userId: string) {\n` +
6262
` "use cache";\n` +

0 commit comments

Comments
 (0)