From b977c3c6753033daaac7465c1e7ca3be71e26ea8 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Tue, 30 Sep 2025 22:51:44 +0000 Subject: [PATCH] Add ensureSupabase helper cgen-979e81e5a48a4c67904db267282a72dd --- client/lib/aethex-database-adapter.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/lib/aethex-database-adapter.ts b/client/lib/aethex-database-adapter.ts index 8da40f90..1cbe4722 100644 --- a/client/lib/aethex-database-adapter.ts +++ b/client/lib/aethex-database-adapter.ts @@ -21,6 +21,14 @@ export interface AethexUserProfile extends UserProfile { const isNonEmptyString = (value: unknown): value is string => typeof value === "string" && value.trim().length > 0; +const ensureSupabase = () => { + if (!isSupabaseConfigured) { + throw new Error( + "Supabase is not configured. Please set VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY.", + ); + } +}; + export function checkProfileComplete(p?: AethexUserProfile | null): boolean { if (!p) return false;