mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-02-12 06:55:08 -05:00
Addresses all 8 Copilot review comments on PR #1940: Critical fixes: - Replace log.Fatal with proper HTTP error response to prevent server crashes on request failures - Add streaming-aware error handling to maintain consistent response format (prevents mixing JSON with NDJSON) Error messaging improvements: - Replace "testing endpoint" placeholders with descriptive error messages - Add clear context for unmarshal and scanning failures Protocol compliance: - Set Content-Type: application/x-ndjson for streaming responses - Ensure all error paths respect stream vs non-stream mode Code cleanup: - Remove commented-out dead code Tested both streaming and non-streaming modes successfully.