diff --git a/core/server/utils/request.js b/core/server/utils/request.js index e92ed40a0f7e..ffa2a93fb726 100644 --- a/core/server/utils/request.js +++ b/core/server/utils/request.js @@ -13,12 +13,14 @@ module.exports = function request(url, options) { })); } - return got( - url, - options - ).then(function (response) { - return Promise.resolve(response); - }).catch(function (err) { - return Promise.reject(err); + return new Promise(function (resolve, reject) { + return got( + url, + options + ).then(function (response) { + return resolve(response); + }).catch(function (err) { + return reject(err); + }); }); };