1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-04 12:52:27 +08:00

addNews return error (#401)

Co-authored-by: p_biaolan <biao.lan@qingteng.cn>
This commit is contained in:
lanbiaowan
2021-06-07 10:03:56 +08:00
committed by GitHub
parent 0e8fc3f88b
commit 7a513080a8

View File

@@ -119,6 +119,9 @@ func (material *Material) AddNews(articles []*Article) (mediaID string, err erro
if err != nil { if err != nil {
return return
} }
if res.ErrCode != 0 {
return "", fmt.Errorf("errcode=%d,errmsg=%s", res.ErrCode, res.ErrMsg)
}
mediaID = res.MediaID mediaID = res.MediaID
return return
} }