diff --git a/weixin/oa_sdk.go b/weixin/oa_sdk.go index 3017549..78a78e1 100644 --- a/weixin/oa_sdk.go +++ b/weixin/oa_sdk.go @@ -39,7 +39,10 @@ func (o *OaSdk) GetQrCode(sceneStr string) (string, error) { } url := fmt.Sprintf("?access_token=%s", oaQrCodeCreateUrl, accessToken) - res, _ := http.Post(url, "application/json", bytes.NewBuffer(marshal)) + res, err := http.Post(url, "application/json", bytes.NewBuffer(marshal)) + if err != nil { + return "", err + } defer res.Body.Close() body, err := io.ReadAll(res.Body) if err != nil {