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