semblance_backup/backend/app
michael fcf79ad302 Fix empty error messages from Google GenAI SDK
Catch genai_errors.APIError specifically and extract e.code and e.message
attributes for proper error logging. The generic str(e) was returning empty
strings for Google API errors, making debugging impossible.

- Import google.genai.errors for specific exception handling
- Add APIError catch before generic Exception in generate_content()
- Add APIError catch before generic Exception in generate_contextual_response()
- Properly categorize errors by HTTP code for retry logic (429/500+ retryable)
- Fix time.sleep to await asyncio.sleep in contextual response handler

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 13:26:55 -06:00
..
auth changed permissions 2025-12-19 19:26:16 +00:00
models Remove __pycache__ files from git tracking 2025-12-19 13:28:19 -06:00
routes Remove __pycache__ files from git tracking 2025-12-19 13:28:19 -06:00
services Fix empty error messages from Google GenAI SDK 2026-01-07 13:26:55 -06:00
utils Remove __pycache__ files from git tracking 2025-12-19 13:28:19 -06:00
.DS_Store changed permissions 2025-12-19 19:26:16 +00:00
__init__.py changed permissions 2025-12-19 19:26:16 +00:00
db.py changed permissions 2025-12-19 19:26:16 +00:00
extensions.py changed permissions 2025-12-19 19:26:16 +00:00
utils.py changed permissions 2025-12-19 19:26:16 +00:00
websocket_debug_tap.py changed permissions 2025-12-19 19:26:16 +00:00
websocket_manager.py changed permissions 2025-12-19 19:26:16 +00:00
websocket_manager_async.py changed permissions 2025-12-19 19:26:16 +00:00