Webapp: catch error when job cannot be found
Fetching a non-existent job can happen due to the asynchronous nature of the webapp, when a job was just deleted. It now no longer complains about this in the JS debug console.
This commit is contained in:
parent
12f4d9b5ce
commit
b22ea953d5
@ -231,7 +231,16 @@ export default {
|
|||||||
// Forward the full job to Tabulator, so that that gets updated too.
|
// Forward the full job to Tabulator, so that that gets updated too.
|
||||||
this.$refs.jobsTable.processJobUpdate(job);
|
this.$refs.jobsTable.processJobUpdate(job);
|
||||||
this._recalcTasksTableHeight();
|
this._recalcTasksTableHeight();
|
||||||
});
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
if (err.status == 404) {
|
||||||
|
// It can happen that a job cannot be found, for example when it was asynchronously deleted.
|
||||||
|
this.jobs.deselectAllJobs();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
console.log(`Unable to fetch job ${jobID}:`, err);
|
||||||
|
})
|
||||||
|
;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user