tasks.get returns null on not found

This commit is contained in:
Girish Ramakrishnan
2021-07-14 10:59:49 -07:00
parent e59d0e878d
commit ac70350531
2 changed files with 3 additions and 2 deletions

View File

@@ -72,8 +72,8 @@ async.series([
debug(`Starting task ${taskId}. Logs are at ${logFile}`);
const [getError, task] = await safe(tasks.get(taskId));
if (getError) {
debug(getError);
if (getError || !task) {
debug(getError ? `Error getting task: ${getError.message}` : 'Task not found');
return process.exit(50);
}