Use w.ResponseWriter.Status() instead of parsing StatusCode from JSON
payload. routes.go typically sends errors as gin.H{"error": "..."}
without a StatusCode field, causing all errors to be mapped to
"api_error" instead of the appropriate type (not_found_error,
invalid_request_error, etc.).
Added tests to verify error handling for common routes.go patterns.
|
||
|---|---|---|
| .. | ||
| anthropic.go | ||
| anthropic_test.go | ||
| openai.go | ||
| openai_encoding_format_test.go | ||
| openai_test.go | ||