From 6dd8fac410909b1534a48d5eb5d8e2f5d9acb671 Mon Sep 17 00:00:00 2001 From: Konstantin Wohlwend Date: Sun, 15 Feb 2026 17:21:46 -0800 Subject: [PATCH] Improve sign-up rule error descriptions --- packages/stack-shared/src/known-errors.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/stack-shared/src/known-errors.tsx b/packages/stack-shared/src/known-errors.tsx index d4358b995..0118ea748 100644 --- a/packages/stack-shared/src/known-errors.tsx +++ b/packages/stack-shared/src/known-errors.tsx @@ -84,7 +84,7 @@ export abstract class KnownError extends StatusError { } } - throw new Error(`Unknown KnownError code. You may need to update your version of Stack to see more detailed information. ${json.code}: ${json.message}`); + throw new Error(`An error occurred. Please update your version of the Stack Auth SDK. ${json.code}: ${json.message}`); } } @@ -731,9 +731,9 @@ const SignUpRejected = createKnownErrorConstructor( "SIGN_UP_REJECTED", (message?: string) => [ 403, - message ?? "Your sign up was rejected. Please contact us for more information.", + message ?? "Your sign up was rejected by an administrator's sign-up rule.", { - message: message ?? "Your sign up was rejected. Please contact us for more information.", + message: message ?? "Your sign up was rejected by an administrator's sign-up rule.", }, ] as const, (json: any) => [json.message] as const,