预警23
This commit is contained in:
parent
890f723716
commit
39a6d78f2b
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue