mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
Capture error when calling old dashboard API
This commit is contained in:
parent
853d369dcb
commit
886553b82b
@ -1,8 +1,11 @@
|
||||
import { StackAssertionError, captureError } from "@stackframe/stack-shared/dist/utils/errors";
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
const handler = async (req: NextRequest) => {
|
||||
const msg = "Stack Auth's dashboard API is no longer available. Please upgrade the version of your Stack Auth client library, or join our Discord server for assistance: https://discord.stack-auth.com";
|
||||
captureError("old-dashboard-api", new StackAssertionError(msg, { req }));
|
||||
return NextResponse.json({
|
||||
error: "Stack Auth's dashboard API is no longer available. Please upgrade the version of your Stack Auth client library, or join our Discord server for assistance: https://discord.stack-auth.com",
|
||||
error: msg,
|
||||
}, {
|
||||
status: 400,
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user