This commit is contained in:
@@ -518,6 +518,7 @@ export default {
|
||||
that.statusEx(r);
|
||||
//delete will return a body if there is an error of some kind with the request
|
||||
r = await that.extractBodyEx(r);
|
||||
|
||||
return r;
|
||||
} catch (error) {
|
||||
//fundamental error, can't proceed with this call
|
||||
|
||||
@@ -588,40 +588,6 @@ export default {
|
||||
// is to return errors if they exist for *that* field
|
||||
//
|
||||
serverErrors(vm, ref) {
|
||||
//CHECK PREREQUISITES IN DEV MODE TO ENSURE FORM ISN"T MISSING NEEDED DATA ATTRIBUTES ETC
|
||||
// if (vm.$ay.dev) {
|
||||
// //make sure formState.serverErrors is defined on data
|
||||
// if (!window.$gz.util.has(vm, "formState.serverError")) {
|
||||
// throw new Error(
|
||||
// "DEV ERROR gzform::formState.serverErrors -> formState.serverError seems to be missing from form's vue data object"
|
||||
// );
|
||||
// }
|
||||
|
||||
// //make sure formState.appError is defined on data
|
||||
// if (!window.$gz.util.has(vm, "formState.appError")) {
|
||||
// throw new Error(
|
||||
// "DEV ERROR gzform::formState.serverErrors -> formState.appError seems to be missing from form's vue data object"
|
||||
// );
|
||||
// }
|
||||
|
||||
// //make sure formState.errorBoxMessage is defined on data
|
||||
// if (!window.$gz.util.has(vm, "formState.errorBoxMessage")) {
|
||||
// throw new Error(
|
||||
// "DEV ERROR gzform::formState.serverErrors -> formState.errorBoxMessage seems to be missing from form's vue data object"
|
||||
// );
|
||||
// }
|
||||
|
||||
// //ensure the error returned is in an expected format to catch coding errors at the server end
|
||||
// if (!window.$gz.util.objectIsEmpty(vm.formState.serverError)) {
|
||||
// //de-lodash with my own function
|
||||
// //Make sure there is an error code if there is an error collection
|
||||
// if (!vm.formState.serverError.code) {
|
||||
// throw new Error(
|
||||
// "DEV ERROR gzform::formState.serverErrors -> server returned error without code"
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
let ret = [];
|
||||
|
||||
//check for errors if we have any errors
|
||||
@@ -688,14 +654,14 @@ export default {
|
||||
ve.error +
|
||||
"]";
|
||||
if (ve.message) {
|
||||
//NOTE: This is how to handle calling an async function from a sync function
|
||||
//NOTE: This is (**still not**) how to handle calling an async function from a sync function
|
||||
//for reference sync async function async method from sync method
|
||||
//it just can't be done and this needs to go away and not be expected to do this
|
||||
let transMessage = ve.message;
|
||||
window.$gz.translation
|
||||
.translateStringWithMultipleKeys(ve.message)
|
||||
.then(result => {
|
||||
transMessage = result;
|
||||
console.log("Got Translation");
|
||||
});
|
||||
fldErr += ' - "' + transMessage + '"';
|
||||
ret.push(fldErr);
|
||||
@@ -709,7 +675,7 @@ export default {
|
||||
vm: vm,
|
||||
valid: false
|
||||
});
|
||||
console.log("done - Returning");
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user