mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-09-24 16:05:44 +08:00
fix: satisfy grok media lint
This commit is contained in:
@@ -485,12 +485,12 @@ func (s *OpenAIGatewayService) handleGrokMediaErrorResponse(
|
||||
}
|
||||
|
||||
func grokMediaErrorType(statusCode int) string {
|
||||
switch {
|
||||
case statusCode == http.StatusBadRequest:
|
||||
switch statusCode {
|
||||
case http.StatusBadRequest:
|
||||
return "invalid_request_error"
|
||||
case statusCode == http.StatusNotFound:
|
||||
case http.StatusNotFound:
|
||||
return "not_found_error"
|
||||
case statusCode == http.StatusTooManyRequests:
|
||||
case http.StatusTooManyRequests:
|
||||
return "rate_limit_error"
|
||||
default:
|
||||
return "upstream_error"
|
||||
|
||||
Reference in New Issue
Block a user