aboutsummaryrefslogtreecommitdiffstats
path: root/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'app.js')
-rw-r--r--app.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/app.js b/app.js
index 59bb3c54..c739c325 100644
--- a/app.js
+++ b/app.js
@@ -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);
};