From 8f2f2182f09320af2dda90329d764270b30d276b Mon Sep 17 00:00:00 2001 From: formsdev <136701234+formsdev@users.noreply.github.com> Date: Wed, 24 Jan 2024 14:35:47 +0530 Subject: [PATCH] fix display error message (#293) Co-authored-by: Julien Nahum --- client/components/open/components/RecordOperations.vue | 2 +- client/components/pages/forms/create/CreateFormBaseModal.vue | 2 +- client/components/pages/pricing/CheckoutDetailsModal.vue | 2 +- client/pages/settings/account.vue | 2 +- client/pages/settings/admin.vue | 2 +- client/pages/settings/billing.vue | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/components/open/components/RecordOperations.vue b/client/components/open/components/RecordOperations.vue index 08ee50f..19c79d9 100644 --- a/client/components/open/components/RecordOperations.vue +++ b/client/components/open/components/RecordOperations.vue @@ -59,7 +59,7 @@ export default { this.useAlert.error('Something went wrong!') } }).catch((error) => { - this.useAlert.error(error.response.data.message) + this.useAlert.error(error.data.message) }) } } diff --git a/client/components/pages/forms/create/CreateFormBaseModal.vue b/client/components/pages/forms/create/CreateFormBaseModal.vue index 9996ee9..dc1496d 100644 --- a/client/components/pages/forms/create/CreateFormBaseModal.vue +++ b/client/components/pages/forms/create/CreateFormBaseModal.vue @@ -145,7 +145,7 @@ export default { this.fetchGeneratedForm(generationId) } }).catch(error => { - this.useAlert.error(error.response.data.message) + this.useAlert.error(error.data.message) this.state = 'default' this.loading = false }) diff --git a/client/components/pages/pricing/CheckoutDetailsModal.vue b/client/components/pages/pricing/CheckoutDetailsModal.vue index 689f243..c9d639d 100644 --- a/client/components/pages/pricing/CheckoutDetailsModal.vue +++ b/client/components/pages/pricing/CheckoutDetailsModal.vue @@ -83,7 +83,7 @@ export default { opnFetch('/subscription/new/' + this.plan + '/' + (!this.yearly ? 'monthly' : 'yearly') + '/checkout/with-trial').then((data) => { window.location = data.checkout_url }).catch((error) => { - useAlert().error(error.response.data.message) + useAlert().error(error.data.message) }).finally(() => { this.loading = false this.close() diff --git a/client/pages/settings/account.vue b/client/pages/settings/account.vue index df16c5f..2556a7c 100644 --- a/client/pages/settings/account.vue +++ b/client/pages/settings/account.vue @@ -41,7 +41,7 @@ const deleteAccount = () => { // Redirect to login. router.push({ name: 'login' }) }).catch((error) => { - useAlert().error(error.response.data.message) + useAlert().error(error.data.message) loading = false }) } diff --git a/client/pages/settings/admin.vue b/client/pages/settings/admin.vue index fa6d1a2..4861e95 100644 --- a/client/pages/settings/admin.vue +++ b/client/pages/settings/admin.vue @@ -76,7 +76,7 @@ const impersonate = () => { router.push({ name: 'home' }) }).catch((error) => { console.error(error) - useAlert().error(error.response.data.message) + useAlert().error(error.data.message) loading.value = false }) } diff --git a/client/pages/settings/billing.vue b/client/pages/settings/billing.vue index 66300b8..df98d09 100644 --- a/client/pages/settings/billing.vue +++ b/client/pages/settings/billing.vue @@ -41,7 +41,7 @@ const openBillingDashboard = () => { const url = data.portal_url window.location = url }).catch((error) => { - useAlert().error(error.response.data.message) + useAlert().error(error.data.message) }).finally(() => { billingLoading = false })