feat: automatically ban channels that exceeded quota
This commit is contained in:
1 parent
9ba6abedd9
commit
0180f51f51
1 file changed
+2
@@ -57,6 +57,8 @@ func ShouldDisableChannel(err *relaymodel.OpenAIError, statusCode int) bool {
|
|||||||
return true
|
return true
|
||||||
} else if strings.HasPrefix(err.Message, "This organization has been disabled.") {
|
} else if strings.HasPrefix(err.Message, "This organization has been disabled.") {
|
||||||
return true
|
return true
|
||||||
|
} else if strings.HasPrefix(err.Message, "You exceeded your current quota") {
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user