Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
5d586a9f
Commit
5d586a9f
authored
Apr 17, 2026
by
shaw
Browse files
fix: 上游返回 KYC 身份验证要求时停止账号调度
parent
a789c8c4
Changes
1
Show whitespace changes
Inline
Side-by-side
backend/internal/service/ratelimit_service.go
View file @
5d586a9f
...
...
@@ -152,6 +152,11 @@ func (s *RateLimitService) HandleUpstreamError(ctx context.Context, account *Acc
msg
:=
"Credit balance exhausted (400): "
+
upstreamMsg
s
.
handleAuthError
(
ctx
,
account
,
msg
)
shouldDisable
=
true
}
else
if
strings
.
Contains
(
strings
.
ToLower
(
upstreamMsg
),
"identity verification is required"
)
{
// KYC 身份验证要求 → 永久禁用,账号需完成身份验证后才能恢复
msg
:=
"Identity verification required (400): "
+
upstreamMsg
s
.
handleAuthError
(
ctx
,
account
,
msg
)
shouldDisable
=
true
}
// 其他 400 错误(如参数问题)不处理,不禁用账号
case
401
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment