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

@@ -84,7 +84,7 @@ func RerankHelper(c *gin.Context, relayMode int) (newAPIError *types.NewAPIError
}
resp, err := adaptor.DoRequest(c, relayInfo, requestBody)
if err != nil {
return types.NewError(err, types.ErrorCodeDoRequestFailed)
return types.NewOpenAIError(err, types.ErrorCodeDoRequestFailed, http.StatusInternalServerError)
}
statusCodeMappingStr := c.GetString("status_code_mapping")