diff --git a/client/lib/aethex-database-adapter.ts b/client/lib/aethex-database-adapter.ts index 0aeeb4e1..651a67f3 100644 --- a/client/lib/aethex-database-adapter.ts +++ b/client/lib/aethex-database-adapter.ts @@ -188,9 +188,12 @@ export const aethexUserService = { } if (isTableMissing(error)) { - throw new Error( - 'Supabase table "user_profiles" is missing. Please run the required migrations.', - ); + console.warn('user_profiles table missing during getProfileById - returning local fallback if available'); + try { + const raw = localStorage.getItem(`demo_profile_${userId}`); + if (raw) return JSON.parse(raw) as AethexUserProfile; + } catch {} + return null; } throw error;