From 5bcafe13114494a6b3d10cd0355bd7b5cbc7a9aa Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 16 May 2020 16:57:26 +0200 Subject: [PATCH] Change in error handling. --- .../js/components/transactions/CreateTransaction.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/assets/js/components/transactions/CreateTransaction.vue b/resources/assets/js/components/transactions/CreateTransaction.vue index 33e1d45d8e..935720168c 100644 --- a/resources/assets/js/components/transactions/CreateTransaction.vue +++ b/resources/assets/js/components/transactions/CreateTransaction.vue @@ -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;