AOSSIE-Org / AOSSIE-Org/Devr.AI

BUG:Backend crashes on startup when Supabase environment variables are missing or invalid

Đang mở
#192 5 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
102
Fork
137
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Is there an existing issue for this?

- [x] I have searched the existing issues

### What happened?

## 📌 Issue Overview
When running the backend locally by following the INSTALL_GUIDE, the application crashes during startup if the Supabase environment variables are not configured or contain placeholder values.

This prevents contributors from running the backend locally without completing the full Supabase setup.

## 🔍 Steps to Reproduce
1. Clone the repository
2. Install dependencies using Poetry
3. Create a `.env` file with missing or placeholder values for `SUPABASE_URL` and `SUPABASE_KEY`
4. Navigate to the backend directory
5. Run the backend using:
```bash
poetry run python main.py

## 🎯 Expected Behavior
The application should fail gracefully with a clear and actionable error message indicating that SUPABASE_URL and SUPABASE_KEY must be configured, or provide guidance for running the backend in a minimal local development mode.

## 🚨 Actual Behavior
The application crashes during startup with the following error:
supabase._async.client.SupabaseException: Invalid URL
The exception occurs during Supabase client initialization and stops the application from starting.

## 📷 Screenshot

## 💡 Suggested Improvements
1.Validate required environment variables at application startup and provide a clear error message if they are missing or invalid

2.Consider lazy initialization or a minimal local development mode that allows contributors to run the backend without a full Supabase setup

### Record

- [x] I agree to follow this project's Code of Conduct
- [x] I want to work on this issue

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.