diff --git a/get-info.js b/get-info.js index c7d37119..9fc2d45d 100644 --- a/get-info.js +++ b/get-info.js @@ -18,7 +18,12 @@ function getJSON(options, callback) { buffer += chunk; }); res.on('end', function() { - var data = JSON.parse(buffer); + try { + var data = JSON.parse(buffer); + } + catch(e) { + console.log("JSON fail"); + } callback(res.statusCode, data); }); });