|
|
@@ -2,6 +2,7 @@ package ali
|
|
|
|
|
|
import (
|
|
|
"net/http"
|
|
|
+ "strings"
|
|
|
|
|
|
"github.com/labring/aiproxy/core/relay/adaptor"
|
|
|
"github.com/labring/aiproxy/core/relay/adaptor/openai"
|
|
|
@@ -23,5 +24,9 @@ func ErrorHanlder(resp *http.Response) adaptor.Error {
|
|
|
openAIError.Type = relaymodel.ErrorTypeUpstream
|
|
|
}
|
|
|
|
|
|
+ if strings.Contains(openAIError.Message, "object is not iterable") {
|
|
|
+ statusCode = http.StatusBadRequest
|
|
|
+ }
|
|
|
+
|
|
|
return relaymodel.NewOpenAIError(statusCode, openAIError)
|
|
|
}
|