Skip to content

Commit

Permalink
fix: handle aliyun SMS response error (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
leo220yuyaodog authored Feb 21, 2023
1 parent de49184 commit 7c47520
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion aliyun.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ func (c *AliyunClient) SendMessage(param map[string]string, targetPhoneNumber ..
request.TemplateParam = string(requestParam)
request.SignName = c.sign

_, err = c.core.SendSms(request)
response, err := c.core.SendSms(request)
if response.Code != "OK" {
return fmt.Errorf(response.Message)
}
return err
}

0 comments on commit 7c47520

Please sign in to comment.