From 7d2f5fec44eb55388963aab0d217d33536a5d165 Mon Sep 17 00:00:00 2001 From: Galindo97 Date: Thu, 12 Feb 2026 14:13:14 -0600 Subject: [PATCH] fix: check for `!res.error` instead of `res.success` when handling API responses. --- frontend/src/routes/dashboard/invoices/edit/[id]/+page.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/routes/dashboard/invoices/edit/[id]/+page.svelte b/frontend/src/routes/dashboard/invoices/edit/[id]/+page.svelte index 9273d583..1e1d88b1 100644 --- a/frontend/src/routes/dashboard/invoices/edit/[id]/+page.svelte +++ b/frontend/src/routes/dashboard/invoices/edit/[id]/+page.svelte @@ -557,7 +557,7 @@ `/v1/a76/invoice-settings/${InvoiceTopFieldsFormData.invoice_type}?operation_type=${InvoiceTopFieldsFormData.operation_type}&company_id=${companyStore.activeCompany.id}` ); - if (res.success && res.data) { + if (!res.error && res.data) { const settings = res.data.settings || {}; // Mark as loaded even if empty to prevent retries for the same combination