The callAPIWithETag function extracts error messages from backend responses
but loses the structured error details. Enhanced wrapper now reconstructs
the full error structure based on status codes and error messages.
- Add specific handling for ProjectServiceError class
- Reconstruct OpenAI error details from extracted messages
- Preserve error_type and structured message information
- Add comprehensive debug logging to trace error parsing
This ensures OpenAI authentication/quota errors are properly recognized
and display the correct user-friendly messages in the UI.
- Add detailed logging to API key validation function
- Add debug logs to frontend error parsing
- Add debug logs to TanStack Query error handler
- This will help identify where error handling is failing in the UI