Permalink
Browse files

If an error occurs while polling the events feed, log it and propagat…

…e it to the

user.
  • Loading branch information...
1 parent 844c7cc commit 726947d502ad1566c8f86869811b1c8875571627 @Kami Kami committed Mar 25, 2013
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/events_feed_poller.js
@@ -67,7 +67,13 @@ EventsFeedPoller.prototype._schedulePolling = function() {
this._timeoutId = setTimeout(function() {
self._run(function(err) {
- // Error is not fatal here so we ignore it.
+ // Error is not fatal so the processing is not stopped and we just
+ // propagate it to the user.
+ if (err) {
+ log.debug('Error while polling events feed', {'err': err});
+ self.emit('error', err);
+ }
+
self._schedulePolling();
});
}, interval);

0 comments on commit 726947d

Please sign in to comment.