This commit is contained in:
@@ -39,7 +39,7 @@ function dealWithError(msg, vm) {
|
||||
//If a form instance was provided (vue instance)
|
||||
//then put the error into it
|
||||
if (vm) {
|
||||
if (window.$gz.errorHandler.devMode()) {
|
||||
if (vm.ay.dev()) {
|
||||
//make sure formState.appError is defined on data
|
||||
if (!window.$gz._.has(vm, "formState.appError")) {
|
||||
throw "DEV ERROR errorHandler::dealWithError -> formState.appError seems to be missing from form's vue data object";
|
||||
|
||||
@@ -22,7 +22,7 @@ function stringifyPrimitive(v) {
|
||||
// Show unexpected errors during development
|
||||
//
|
||||
function devShowUnknownError(error) {
|
||||
if (window.$gz.errorHandler.devMode) {
|
||||
if (window.$gz.dev) {
|
||||
// eslint-disable-next-line
|
||||
console.error("gzapi::devShowUnknownError, error is:", error);
|
||||
|
||||
@@ -300,7 +300,8 @@ export default {
|
||||
fetch(that.APIUrl(route), that.fetchGetOptions())
|
||||
.then(that.status)
|
||||
.then(that.json)
|
||||
.then(response => {
|
||||
// eslint-disable-next-line
|
||||
.then((response) => {
|
||||
resolve(response);
|
||||
})
|
||||
.catch(function handleGetError(error) {
|
||||
@@ -331,7 +332,8 @@ export default {
|
||||
fetch(that.APIUrl(route), fetchOptions)
|
||||
.then(that.status)
|
||||
.then(that.json)
|
||||
.then(response => {
|
||||
// eslint-disable-next-line
|
||||
.then((response) => {
|
||||
//Note: response.error indicates there is an error, however this is not an unusual condition
|
||||
//it could be validation errors or other general error so we need to treat it here like it's normal
|
||||
//and let the caller deal with it appropriately
|
||||
@@ -351,7 +353,8 @@ export default {
|
||||
fetch(that.APIUrl(route), that.fetchRemoveOptions())
|
||||
.then(that.status)
|
||||
//.then(that.json)
|
||||
.then(response => {
|
||||
// eslint-disable-next-line
|
||||
.then((response) => {
|
||||
resolve(response);
|
||||
})
|
||||
.catch(function handleRemoveError(error) {
|
||||
@@ -369,7 +372,8 @@ export default {
|
||||
fetch(that.APIUrl(route), that.fetchPostOptions(null))
|
||||
.then(that.status)
|
||||
.then(that.json)
|
||||
.then(response => {
|
||||
// eslint-disable-next-line
|
||||
.then((response) => {
|
||||
//Note: response.error indicates there is an error, however this is not an unusual condition
|
||||
//it could be validation errors or other general error so we need to treat it here like it's normal
|
||||
//and let the caller deal with it appropriately
|
||||
|
||||
Reference in New Issue
Block a user