throw "string" -> throw new Error("string"
This commit is contained in:
@@ -203,7 +203,7 @@ export default {
|
||||
//call seed route
|
||||
let jobId = await window.$gz.api.upsert("attachment/maintenance");
|
||||
if (jobId.error) {
|
||||
throw jobId.error;
|
||||
throw new Error(jobId.error);
|
||||
}
|
||||
jobId = jobId.jobId; //it's in a sub key
|
||||
vm.jobActive = true;
|
||||
@@ -229,11 +229,11 @@ export default {
|
||||
`job-operations/status/${jobId}`
|
||||
);
|
||||
if (jobStatus.error) {
|
||||
throw jobStatus.error;
|
||||
throw new Error(jobStatus.error);
|
||||
}
|
||||
jobStatus = jobStatus.data;
|
||||
if (jobStatus == 4 || jobStatus == 0) {
|
||||
throw "Seeding job failed";
|
||||
throw new Error("Seeding job failed");
|
||||
}
|
||||
if (jobStatus == 3) {
|
||||
vm.jobActive = false;
|
||||
|
||||
Reference in New Issue
Block a user