diff options
Diffstat (limited to 'app.js')
| -rw-r--r-- | app.js | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -92,9 +92,12 @@ var r, stream; stream = fs.createWriteStream(file); r = request("https://api.bitcoinaverage.com/exchanges/all"); - return r.on('data', function(chunk) { + r.on('data', function(chunk) { return stream.write(chunk); }); + return r.on('error', function(error) { + return console.log(error); + }); }); return setTimeout(fetchRates, 120000); }; |
