Skip to content

Commit 30ec271

Browse files
fix(nextjs): improve auth() error message to mention infrastructure failures (#8007)
Co-authored-by: Tom Milewski <me@tm.codes>
1 parent cd6c4b7 commit 30ec271

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@clerk/nextjs": patch
3+
---
4+
5+
Improved `auth()` error message when `clerkMiddleware()` is not detected to mention that infrastructure issues (e.g. edge runtime errors or platform outages) can also cause this error.

packages/nextjs/src/server/errors.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export const authAuthHeaderMissing = (helperName = 'auth', prefixSteps?: string[
2828
- Your ${fileReference} matcher is configured to match this route or page.
2929
- If you are using the src directory, make sure the ${fileReference} file is inside of it.
3030
31+
If you've verified your configuration and are still seeing this error, there may be a runtime issue or a problem communicating with Clerk.
32+
3133
For more details, see https://clerk.com/err/auth-middleware
3234
`;
3335
};

0 commit comments

Comments
 (0)