This commit is contained in:
ziming 2025-07-02 10:43:51 +08:00
parent 890f723716
commit 39a6d78f2b
1 changed files with 4 additions and 4 deletions

View File

@ -121,15 +121,15 @@ func (s *AliYunService) SendSMS(ctx context.Context, phoneNumbers []string, temp
} }
} }
response, err := s.client.SendSms(request) response, err2 := s.client.SendSms(request)
if err != nil { if err != nil {
lastError = fmt.Errorf("发送短信失败 (尝试 %d/%d): %w", i+1, s.retryTime+1, err) lastError = fmt.Errorf("发送短信失败 (尝试 %d/%d): %w", i+1, s.retryTime+1, err2)
continue continue
} }
if response.Code != "OK" { if response.Code != "OK" {
lastError = fmt.Errorf("发送短信失败 (尝试 %d/%d): 代码=%s, 消息=%s", lastError = fmt.Errorf("发送短信失败 (尝试 %d/%d): 代码=%s, 消息=%s,请求=%s",
i+1, s.retryTime+1, response.Code, response.Message) i+1, s.retryTime+1, response.Code, response.Message, request.TemplateParam)
continue continue
} }