fix: 上游返回 KYC 身份验证要求时停止账号调度

This commit is contained in:
shaw
2026-04-17 10:17:50 +08:00
parent a789c8c4c7
commit 5d586a9f3a

View File

@@ -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: