AOSSIE-Org / AOSSIE-Org/Devr.AI

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

Open
#192 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
102
Forks
137
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.