mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
Improve some error messages
This commit is contained in:
parent
66b9998d5c
commit
9e0b3de21a
4
apps/partial-prerendering/.env
Normal file
4
apps/partial-prerendering/.env
Normal file
@ -0,0 +1,4 @@
|
||||
NEXT_PUBLIC_STACK_URL=# enter your stack endpoint here, e.g. http://localhost:8101
|
||||
NEXT_PUBLIC_STACK_PROJECT_ID=# enter your stack project id here
|
||||
NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY=# enter your stack publishable client key here
|
||||
STACK_SECRET_SERVER_KEY=# enter your stack secret server key here
|
||||
@ -68,7 +68,7 @@ const handler = deprecatedSmartRouteHandler(async (req: NextRequest) => {
|
||||
const asValid = await isProjectAdmin(projectId, adminAccessToken);
|
||||
|
||||
if (!pkValid && !skValid && !asValid) {
|
||||
throw new StatusError(StatusError.Forbidden);
|
||||
throw new StatusError(StatusError.Forbidden, "API key is invalid");
|
||||
}
|
||||
|
||||
const decodedAccessToken = await decodeAccessToken(authorization.split(" ")[1]);
|
||||
|
||||
@ -34,7 +34,7 @@ export default function RootLayout({
|
||||
const headTags: TagConfigJson[] = JSON.parse(getEnvVariable('NEXT_PUBLIC_STACK_HEAD_TAGS'));
|
||||
|
||||
return (
|
||||
<html lang="en" className={`${GeistSans.variable} ${GeistMono.variable}`}>
|
||||
<html lang="en" className={`${GeistSans.variable} ${GeistMono.variable}`} suppressHydrationWarning>
|
||||
<head>
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" />
|
||||
<StyleLink href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded&display=block" />
|
||||
|
||||
@ -83,7 +83,6 @@ export function pending<T>(promise: Promise<T>, options: { disableErrorWrapping?
|
||||
}
|
||||
|
||||
function createReactPromiseErrorWrapper(error: unknown): Error {
|
||||
console.log("AGHH", error);
|
||||
return new ReactPromiseErrorWrapper(error);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user