AOSSIE-Org / AOSSIE-Org/Devr.AI

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

未关闭
#192 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
102
派生
137
PR 合并指标
30 天内没有已合并 PR

描述

### 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

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。