fix error message
Some checks failed
all-good: Did all the other checks pass? / all-good (push) Has been cancelled
Ensure Prisma migrations are in sync with the schema / check_prisma_migrations (22.x) (push) Has been cancelled
Docker Emulator Test / docker (push) Has been cancelled
Docker Server Build and Push / Docker Build and Push Server (push) Has been cancelled
Docker Server Test / docker (push) Has been cancelled
Runs E2E API Tests / build (22.x) (push) Has been cancelled
Lint & build / lint_and_build (latest) (push) Has been cancelled
Preview Docs / run (push) Has been cancelled
Dev Environment Test / restart-dev-and-test (push) Has been cancelled
Run setup tests / setup-tests (push) Has been cancelled
TOC Generator / TOC Generator (push) Has been cancelled

This commit is contained in:
Konstantin Wohlwend 2025-04-04 13:49:12 -07:00
parent 592d259dde
commit 68e5c370b4

View File

@ -3,7 +3,7 @@ import { NextRequest, NextResponse } from "next/server";
import '../../../polyfills';
const handler = async (req: NextRequest) => {
const msg = "You attempted to access /api on the Stack Auth dashboard URL, instead of the API URL. Did you mean to access https://api.stack-auth.com/api instead?\n\nFor more guidance, please join our Discord server for assistance: https://discord.stack-auth.com";
const msg = "You attempted to access /api on the Stack Auth dashboard URL, instead of the API URL. Did you mean to access https://api.stack-auth.com/api instead (with an I instead of a P)?\n\nFor more guidance, please join our Discord server for assistance: https://discord.stack-auth.com";
console.warn(`${req.headers.has('x-stack-project-id') ? `Project ${req.headers.get('x-stack-project-id')}` : "A user"} attempted to access the old dashboard API.`, nicify(req));
return NextResponse.json({
error: msg,