fixing btc

This commit is contained in:
martind2000 2017-06-12 13:37:38 +01:00
parent 3d444486f1
commit bcc7a3d87e

View File

@ -23,7 +23,12 @@
}); });
response.on('end', function () { response.on('end', function () {
console.log('>> data', data); console.log('>> data', data);
try {
callback(JSON.parse(data), r); callback(JSON.parse(data), r);
} catch (e) {
console.error(e);
}
}); });
response.on('error', function (e) { response.on('error', function (e) {
console.error(e); console.error(e);