@ -170,10 +170,13 @@ function request(url, callback) {
require('request')(url, {
json: true,
}, function (err, res, body) {
if (err) {
return callback(err);
}
if (res.statusCode === 404 || !body) {
return callback(err, {});
return callback(null, {});
callback(err, body);
callback(null, body);
});
const requestAsync = util.promisify(request);