This commit is contained in:
@@ -95,7 +95,8 @@ export default {
|
||||
let res = await window.$gz.api.get("enum-list/list/" + enumKey);
|
||||
//We never expect there to be no data here
|
||||
if (!res.hasOwnProperty("data")) {
|
||||
throw new Error(res);
|
||||
// throw new Error(res);
|
||||
return Promise.reject(res);
|
||||
}
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ function dealWithError(msg, vm) {
|
||||
let errMsg = "DEV MODE errorHandler.js:: Unexpected error: \r\n" + msg;
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(errMsg);
|
||||
//console.trace();
|
||||
|
||||
//debugger;
|
||||
}
|
||||
|
||||
@@ -68,8 +68,16 @@ function dealWithError(msg, vm) {
|
||||
// and return human readable text
|
||||
//
|
||||
function decodeError(e, vm) {
|
||||
// console.log("decodeError The e object is an object:");
|
||||
// //console.log(JSON.stringify(e));
|
||||
// console.log(typeof e === "object");
|
||||
|
||||
//empty?
|
||||
if (e == null || e == "") {
|
||||
if (
|
||||
e == null ||
|
||||
e == "" ||
|
||||
(typeof e === "object" && Object.keys(e).length === 0)
|
||||
) {
|
||||
return "errorHandler::decodeError - Error is unknown / empty";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user