From 011b5814a743867285e2362b68b163c83cfea861 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 28 Nov 2024 11:41:22 +0100 Subject: [PATCH] fix: refs #7936 improve error handling --- src/components/CrudModel.vue | 3 ++- .../InvoiceIn/Card/InvoiceInCorrective.vue | 18 +++++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index 85bd5457a..7dd5129e9 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -176,7 +176,8 @@ async function saveChanges(data) { try { await axios.post($props.saveUrl || $props.url + '/crud', changes); } catch (e) { - return (isLoading.value = false); + isLoading.value = false; + throw e; } originalData.value = JSON.parse(JSON.stringify(formData.value)); if (changes.creates?.length) await vnPaginateRef.value.fetch(); diff --git a/src/pages/InvoiceIn/Card/InvoiceInCorrective.vue b/src/pages/InvoiceIn/Card/InvoiceInCorrective.vue index 165b3e0df..1d0a8d078 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInCorrective.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInCorrective.vue @@ -1,22 +1,21 @@