mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-13 01:02:27 +08:00
Compare commits
1 Commits
11dbb7c3f9
...
6a4ab9cbe2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a4ab9cbe2 |
@@ -192,9 +192,10 @@ func (r *Client) GetTempFile(mediaID string) ([]byte, error) {
|
||||
}
|
||||
|
||||
// 检查响应是否为错误信息
|
||||
err = util.DecodeWithCommonError(response, "GetTempFile")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
errorResponse := &util.CommonError{}
|
||||
err = util.DecodeWithError(response, errorResponse, "GetTempFile")
|
||||
if err == nil && errorResponse.ErrCode != 0 {
|
||||
return nil, fmt.Errorf("GetTempFile error: %d, %s", errorResponse.ErrCode, errorResponse.ErrMsg)
|
||||
}
|
||||
|
||||
// 如果不是错误响应,则返回原始数据
|
||||
|
||||
Reference in New Issue
Block a user