User lists now working properly with datalist. Fixup for many areas where error constructor was being called with object instead of string
This commit is contained in:
@@ -93,7 +93,8 @@ export default {
|
||||
//call api route
|
||||
let jobId = await window.$gz.api.upsert(url, body);
|
||||
if (jobId.error) {
|
||||
throw new Error(jobId.error);
|
||||
//throw new Error(jobId.error);
|
||||
throw new Error(window.$gz.errorHandler.errorToString(jobId, vm));
|
||||
}
|
||||
jobId = jobId.jobId; //it's in a sub key
|
||||
//indicate loading by setting on button
|
||||
@@ -120,7 +121,10 @@ export default {
|
||||
`job-operations/status/${jobId}`
|
||||
);
|
||||
if (jobStatus.error) {
|
||||
throw new Error(jobStatus.error);
|
||||
//throw new Error(jobStatus.error);
|
||||
throw new Error(
|
||||
window.$gz.errorHandler.errorToString(jobStatus, vm)
|
||||
);
|
||||
}
|
||||
jobStatus = jobStatus.data;
|
||||
if (jobStatus == 4 || jobStatus == 0) {
|
||||
|
||||
@@ -270,8 +270,7 @@ export default {
|
||||
|
||||
vm.fetching = false;
|
||||
//We never expect there to be no data here
|
||||
if (!res.hasOwnProperty("data")) {
|
||||
//throw new Error(res);
|
||||
if (!res.hasOwnProperty("data")) {
|
||||
return Promise.reject(res);
|
||||
}
|
||||
vm.searchResults = res.data;
|
||||
|
||||
@@ -134,7 +134,8 @@ export default {
|
||||
`report/list/${reportDataOptions.ObjectType}`
|
||||
);
|
||||
if (res.error) {
|
||||
throw new Error(res.error);
|
||||
// throw new Error(res.error);
|
||||
throw new Error(window.$gz.errorHandler.errorToString(res, vm));
|
||||
} else {
|
||||
this.reportList = res.data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user