Skip to content

Commit d2e7916

Browse files
committed
Add debug logging for DATABASE_URL
1 parent 61e8ad3 commit d2e7916

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/api_server.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222

2323
# Database connection
2424
DATABASE_URL = os.getenv("DATABASE_URL")
25+
print(f"[DEBUG] DATABASE_URL loaded: {DATABASE_URL[:50] if DATABASE_URL else 'NOT SET'}...")
2526
if not DATABASE_URL:
27+
print("[ERROR] DATABASE_URL environment variable is not set!")
28+
print(f"[DEBUG] Available env vars: {', '.join([k for k in os.environ.keys() if 'DATA' in k or 'DB' in k or 'POSTGRES' in k])}")
2629
raise ValueError(
2730
"DATABASE_URL environment variable is not set! "
2831
"Please set it in your Render dashboard Environment variables."

0 commit comments

Comments
 (0)