mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-10 02:23:43 +08:00
chore: disable channel when error message contain quota
This commit is contained in:
@@ -46,6 +46,9 @@ func ShouldDisableChannel(err *relaymodel.Error, statusCode int) bool {
|
|||||||
} 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
|
||||||
}
|
}
|
||||||
|
if strings.Contains(err.Message, "quota") {
|
||||||
|
return true
|
||||||
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user