addNews return error (#401)

Co-authored-by: p_biaolan <biao.lan@qingteng.cn>
This commit is contained in:
lanbiaowanandp_biaolan authored and GitHub committed 2021-06-07 10:03:56 +08:00
1 parent 0e8fc3f88b
commit 7a513080a8
1 file changed
+3
+3
View File
@@ -119,6 +119,9 @@ func (material *Material) AddNews(articles []*Article) (mediaID string, err erro
if err != nil {
return
}
if res.ErrCode != 0 {
return "", fmt.Errorf("errcode=%d,errmsg=%s", res.ErrCode, res.ErrMsg)
}
mediaID = res.MediaID
return
}