From 76569bb0b64d470aee3e970fe8e82557c8931cde Mon Sep 17 00:00:00 2001 From: JustSong Date: Fri, 5 Apr 2024 00:31:41 +0800 Subject: [PATCH] chore: disable channel when error message contain credit or balance --- relay/util/common.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/relay/util/common.go b/relay/util/common.go index 0bb76909..d1f79a26 100644 --- a/relay/util/common.go +++ b/relay/util/common.go @@ -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 }