mirror of
https://github.com/ollama/ollama.git
synced 2026-03-27 02:58:43 +07:00
writeError in both OpenAI and Anthropic middleware writers would return a raw json.SyntaxError when the error payload wasn't valid JSON (e.g. "invalid character 'e' looking for beginning of value"). Fall back to using the raw bytes as the error message instead. Also use the actual HTTP status code rather than hardcoding 500, so error types map correctly
41 KiB
41 KiB