fix: 上游返回 KYC 身份验证要求时停止账号调度
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user