feat: publish sanitized custom.97 source
This commit is contained in:
1022 files changed
+69903
-19207
No files matched your search
@@ -2,6 +2,7 @@ package service
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@@ -163,7 +164,13 @@ func IsPoolFailoverError(c *gin.Context, err *types.NewAPIError) bool {
|
||||
if c.Writer != nil && c.Writer.Written() {
|
||||
return false
|
||||
}
|
||||
if err.StatusCode < 500 || err.StatusCode > 599 {
|
||||
if err.StatusCode == http.StatusForbidden {
|
||||
// Only upstream refusals participate in pool failover. Local permission
|
||||
// failures must not gain the pool's retry budget or override strict affinity.
|
||||
if err.GetErrorType() == types.ErrorTypeNewAPIError {
|
||||
return false
|
||||
}
|
||||
} else if err.StatusCode < 500 || err.StatusCode > 599 {
|
||||
return false
|
||||
}
|
||||
return !operation_setting.IsAlwaysSkipRetryStatusCode(err.StatusCode) && !operation_setting.IsAlwaysSkipRetryCode(err.GetErrorCode()) && operation_setting.ShouldRetryByStatusCode(err.StatusCode)
|
||||
|
||||
Reference in new issue
Block a user