fix: replace NewError with NewOpenAIError for improved error handling in multiple handlers

This commit is contained in:
CaIon
2025-07-19 11:29:31 +08:00
parent d19a6914f9
commit a3059597fb
5 changed files with 5 additions and 5 deletions

View File

@@ -125,7 +125,7 @@ func ClaudeHelper(c *gin.Context) (newAPIError *types.NewAPIError) {
var httpResp *http.Response
resp, err := adaptor.DoRequest(c, relayInfo, requestBody)
if err != nil {
return types.NewError(err, types.ErrorCodeDoRequestFailed)
return types.NewOpenAIError(err, types.ErrorCodeDoRequestFailed, http.StatusInternalServerError)
}
if resp != nil {