Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
ho-229 committed Oct 19, 2023
1 parent 3251b13 commit 02a8e7b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/api/sms_provider/huawei_cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"crypto/hmac"
"crypto/sha256"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
Expand Down Expand Up @@ -238,7 +237,7 @@ func (p *HuaweiCloudProvider) SendSms(phone, templateId, otp string) (string, er
}

if r.Code != "000000" || len(r.Result) == 0 {
return "", errors.New(fmt.Sprintf("error code: %s, %s", r.Code, r.Description))
return "", fmt.Errorf("error code: %s, %s", r.Code, r.Description)
}

return r.Result[0].SmsMsgId, nil
Expand Down

0 comments on commit 02a8e7b

Please sign in to comment.