This commit is contained in:
Joel Collins 2020-10-26 15:41:59 +00:00
parent 7a12dfb44b
commit 729e473ea0
2 changed files with 101 additions and 102 deletions

View file

@ -158,9 +158,6 @@ export default {
// Return the poll-task promise (starts polling the task)
return this.pollTask(this.taskId, this.pollInterval);
})
.catch(() => {
this.taskStarted = false;
})
.then(response => {
// Do something with the final response
console.log("Emitting onResponse: ", response);
@ -203,11 +200,13 @@ export default {
// If task ends with an error
else if (result == "error") {
// Pass the error string back with reject
reject(new Error(response.data.return));
console.log("Rejecting pollTask due to error")
reject(new Error(response.data.output));
}
// If task ends with termination
else if (result == "cancelled") {
// Pass a generic termination error back with reject
console.log("Rejecting pollTask due to cancellation")
reject(new Error("Task cancelled"));
} else {
// Since the task is still running, we can update the progress bar