Improve some error messages

This commit is contained in:
Stan Wohlwend 2024-04-28 10:16:39 +02:00
parent 66b9998d5c
commit 9e0b3de21a
4 changed files with 6 additions and 3 deletions

View 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

View File

@ -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]);

View File

@ -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" />

View File

@ -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);
}