chore: disable channel when error message contain credit or balance

This commit is contained in:
JustSong 2024-04-05 00:31:41 +08:00
parent 1994256bac
commit 76569bb0b6

View File

@ -49,6 +49,12 @@ func ShouldDisableChannel(err *relaymodel.Error, statusCode int) bool {
if strings.Contains(err.Message, "quota") {
return true
}
if strings.Contains(err.Message, "credit") {
return true
}
if strings.Contains(err.Message, "balance") {
return true
}
return false
}