Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

fix(frontend): improve waitlist error display for users not on allowlist (#11198)

Nicholas Tindle3f546ae845e4
diff --git a/autogpt_platform/frontend/src/app/api/auth/utils.ts b/autogpt_platform/frontend/src/app/api/auth/utils.ts
index 6df2a82cad..b6d8c7e423 100644
--- a/autogpt_platform/frontend/src/app/api/auth/utils.ts
+++ b/autogpt_platform/frontend/src/app/api/auth/utils.ts
@@ -10,6 +10,8 @@
export function isWaitlistError(error: any): boolean {
if (!error?.message) return false;
+ if (error?.code === "P0001") return true;
+
return (
error.message.includes("P0001") || // PostgreSQL custom error code
error.message.includes("not allowed to register") || // Trigger message
@@ -33,6 +35,8 @@ export function isWaitlistErrorFromParams(
): boolean {
if (!errorDescription) return false;
+ if (errorCode === "P0001") return true;
+
const description = errorDescription.toLowerCase();
return (
description.includes("p0001") || // PostgreSQL error code might be in description