Skip to content

Commit 5c3d919

Browse files
committed
Prevent fatal error when it gets a 403 Error
This commit introduces a handler for `client.getWorkers` when it receives an error argument. This way it won't break JS from running, but instead will just report the error and continue. This is not the best way to fix this problem, but this will prevent false statements on CI runs, creating warnings rather than fatal errros.
1 parent eaab151 commit 5c3d919

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)