Files
PromptArch/app/api/ai-assist/route.ts
Gemini AI 42570a14b7 fix(ai-assist): prevent HTML-as-JSON crash; add safeJsonFetch + JSON-only API errors
- Created lib/safeJsonFetch.ts helper to safely parse JSON responses
- Updated AIAssist.tsx to use safeJsonFetch with proper Content-Type header
- Improved app/api/ai-assist/route.ts with requestId tracking and safe body parsing
- All API responses now return JSON with proper error messages
2025-12-29 00:09:31 +04:00

2.7 KiB