zenaight commited on
Commit ·
f547cc1
1
Parent(s): 69cd16d
supabase key errors
Browse files
main.py
CHANGED
|
@@ -25,8 +25,13 @@ SUPABASE_KEY = os.getenv("SUPABASE_KEY", "")
|
|
| 25 |
|
| 26 |
# --- Supabase Client Setup ---
|
| 27 |
supabase: Client = None
|
| 28 |
-
if SUPABASE_URL and SUPABASE_KEY:
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
else:
|
| 31 |
print("Warning: Supabase credentials not set. Database functionality will be limited.")
|
| 32 |
|
|
|
|
| 25 |
|
| 26 |
# --- Supabase Client Setup ---
|
| 27 |
supabase: Client = None
|
| 28 |
+
if SUPABASE_URL and SUPABASE_KEY and SUPABASE_URL.strip() and SUPABASE_KEY.strip():
|
| 29 |
+
try:
|
| 30 |
+
supabase = create_client(SUPABASE_URL, SUPABASE_KEY)
|
| 31 |
+
print("Supabase client initialized successfully")
|
| 32 |
+
except Exception as e:
|
| 33 |
+
print(f"Warning: Failed to initialize Supabase client: {e}")
|
| 34 |
+
supabase = None
|
| 35 |
else:
|
| 36 |
print("Warning: Supabase credentials not set. Database functionality will be limited.")
|
| 37 |
|