mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-17 16:06:38 +08:00
feat: update auto disable
This commit is contained in:
parent
f0b808a41d
commit
02c0c6501e
@ -73,6 +73,15 @@ func ShouldDisableChannel(channelType int, err *relaymodel.OpenAIErrorWithStatus
|
|||||||
} else if strings.HasPrefix(err.Error.Message, "Permission denied") {
|
} else if strings.HasPrefix(err.Error.Message, "Permission denied") {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if strings.Contains(err.Error.Message, "The security token included in the request is invalid") { // anthropic
|
||||||
|
return true
|
||||||
|
} else if strings.Contains(err.Error.Message, "Operation not allowed") {
|
||||||
|
return true
|
||||||
|
} else if strings.Contains(err.Error.Message, "Your account is not authorized") {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user