mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-19 00:46:37 +08:00
feat: automatically ban channels that exceeded quota
This commit is contained in:
parent
34bf8f8945
commit
a7cfce24d0
@ -57,6 +57,8 @@ func ShouldDisableChannel(err *relaymodel.OpenAIError, statusCode int) bool {
|
||||
return true
|
||||
} else if strings.HasPrefix(err.Message, "This organization has been disabled.") {
|
||||
return true
|
||||
} else if strings.HasPrefix(err.Message, "You exceeded your current quota") {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user