feat: 避免请求出错时暴露渠道信息

This commit is contained in:
CaIon
2023-09-15 17:50:54 +08:00
parent d9deda18c1
commit d1d789616f
3 changed files with 12 additions and 2 deletions

View File

@@ -223,7 +223,7 @@ func Relay(c *gin.Context) {
c.Redirect(http.StatusTemporaryRedirect, fmt.Sprintf("%s?retry=%d", c.Request.URL.Path, retryTimes-1))
} else {
if err.StatusCode == http.StatusTooManyRequests {
err.OpenAIError.Message = "当前分组上游负载已饱和,请稍后再试"
//err.OpenAIError.Message = "当前分组上游负载已饱和,请稍后再试"
}
c.JSON(err.StatusCode, gin.H{
"error": err.OpenAIError,