Skip to content

Commit 989ed0c

Browse files
committed
Merge pull request #122 from leobalter/fix-undefined-worker
Prevent fatal error when it gets a 403 Error
2 parents eaab151 + 5c3d919 commit 989ed0c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bin/cli.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ var statusPoller = {
193193
start: function() {
194194
statusPoller.poller = setInterval(function () {
195195
client.getWorkers(function (err, _workers) {
196+
if (!_workers) {
197+
logger.info(chalk.red('Error found: ' + err));
198+
return;
199+
}
196200
_workers.filter(function(currentValue) {
197201
return currentValue.status === 'running' && workerKeys[currentValue.id] && !workerKeys[currentValue.id].marked;
198202
}).forEach(function(_worker) {

0 commit comments

Comments
 (0)