mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
Improve 403 error messages
This commit is contained in:
parent
755b2322df
commit
d6166a058b
@ -85,7 +85,7 @@ const handler = deprecatedSmartRouteHandler(async (req: NextRequest) => {
|
||||
let user;
|
||||
if (server === "true") {
|
||||
if (!skValid && !asValid) {
|
||||
throw new StatusError(StatusError.Forbidden);
|
||||
throw new StatusError(StatusError.Forbidden, "Secret server key is invalid");
|
||||
}
|
||||
user = await updateServerUser(
|
||||
projectId,
|
||||
@ -100,7 +100,7 @@ const handler = deprecatedSmartRouteHandler(async (req: NextRequest) => {
|
||||
);
|
||||
} else {
|
||||
if (!pkValid && !asValid) {
|
||||
throw new StatusError(StatusError.Forbidden);
|
||||
throw new StatusError(StatusError.Forbidden, "Publishable client key is invalid");
|
||||
}
|
||||
|
||||
user = await updateClientUser(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user