diff --git a/lib/api_media.js b/lib/api_media.js index a0a4df80..841be999 100644 --- a/lib/api_media.js +++ b/lib/api_media.js @@ -92,7 +92,10 @@ exports.getMedia = function (mediaId, callback) { exports._getMedia = function (mediaId, callback) { var url = this.fileServerPrefix + 'media/get?access_token=' + this.token.accessToken + '&media_id=' + mediaId; urllib.request(url, {}, wrapper(function (err, data, res) { - // 不用处理err,因为wrapper函数处理过 + // handle some err + if (err) { + return callback(err); + } var contentType = res.headers['content-type']; if (contentType === 'application/json') { var ret;