Fix display of task error
This commit is contained in:
@@ -178,7 +178,7 @@ function startTask(id, options, callback) {
|
||||
|
||||
const [getError, task] = await safe(get(id));
|
||||
|
||||
let taskError;
|
||||
let taskError = null;
|
||||
if (!getError && task.percent !== 100) { // taskworker crashed or was killed by us
|
||||
if (code === 0) {
|
||||
taskError = {
|
||||
@@ -204,7 +204,7 @@ function startTask(id, options, callback) {
|
||||
|
||||
if (callback) callback(taskError, task ? task.result : null);
|
||||
|
||||
debug(`startTask: ${id} done. error: `, taskError);
|
||||
debug(`startTask: ${id} done. error: ${taskError}`);
|
||||
});
|
||||
|
||||
if (options.timeout) {
|
||||
|
||||
Reference in New Issue
Block a user