mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-19 06:07:28 +00:00
Merge pull request #2647 from seefs001/feature/status-code-auto-disable
feat: status code auto-disable configuration
This commit is contained in:
@@ -57,9 +57,12 @@ func ShouldDisableChannel(channelType int, err *types.NewAPIError) bool {
|
||||
if types.IsSkipRetryError(err) {
|
||||
return false
|
||||
}
|
||||
if err.StatusCode == http.StatusUnauthorized {
|
||||
if operation_setting.ShouldDisableByStatusCode(err.StatusCode) {
|
||||
return true
|
||||
}
|
||||
//if err.StatusCode == http.StatusUnauthorized {
|
||||
// return true
|
||||
//}
|
||||
if err.StatusCode == http.StatusForbidden {
|
||||
switch channelType {
|
||||
case constant.ChannelTypeGemini:
|
||||
|
||||
Reference in New Issue
Block a user