From 7cb9d277e55ff6852674bb1672510179ee8bfbc7 Mon Sep 17 00:00:00 2001 From: jiangyong27 Date: Mon, 21 Oct 2024 18:05:01 +0800 Subject: [PATCH] weixin log --- weixin/oa_sdk.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 {