Spaces:
AiCoderv2
/
Sleeping

akhaliq HF Staff commited on
Commit
625984c
·
1 Parent(s): e13574c

Add detailed error logging to diagnose backend startup issues

Browse files

Backend still failing to start on port 8000. Added comprehensive
error handling and logging to see exactly what's failing.

Changes:
- Wrap all imports in try/except with detailed error logging
- Print full tracebacks when imports fail
- Backend will start even if prompt imports fail
- Fallback prompts ensure functionality continues
- Clear logging shows which prompts loaded successfully

This will help diagnose:
- Which specific import is failing (prompts vs docs_manager)
- Full error traceback for debugging
- Backend will start regardless, allowing frontend to connect
- Logs will show: [Startup] messages with ✅ success or ❌ errors

After deploying, check logs for:
'[Startup] ✅' messages = success
'[Startup] ⚠️' messages = partial failure with fallback
'[Startup] ❌' messages = complete failure with minimal fallback

1 file changed +47 -18
backend_api.py+47-18