Change in error handling.

This commit is contained in:
James Cole 2020-05-16 16:57:26 +02:00
parent 5a771ccc5f
commit 5bcafe1311

View File

@ -449,6 +449,7 @@
}).catch(error => {
// give user errors things back.
// something something render errors.
console.error('Error in transaction submission.');
console.error(error);
this.parseErrors(error.response.data);
@ -651,10 +652,10 @@
parseErrors: function (errors) {
this.setDefaultErrors();
this.error_message = "";
if (errors.message.length > 0) {
this.error_message = this.$t('firefly.errors_submission');
if (typeof errors.errors === 'undefined') {
this.error_message = errors.message;
} else {
this.error_message = '';
this.error_message = this.$t('firefly.errors_submission');
}
let transactionIndex;
let fieldName;