From aefee2c15fbeffe55c000dc1ca07e13b78a2c2dc Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Thu, 28 May 2026 15:18:33 +0200 Subject: [PATCH] fix(clients): log bulk attach/detach failures to console The backend returns descriptive error strings (email/inbound + reason) but the UI only surfaced a count. Forward result.errors to console.error so the actual failure cause is recoverable from DevTools. --- frontend/src/pages/clients/BulkAttachInboundsModal.tsx | 1 + frontend/src/pages/clients/BulkDetachInboundsModal.tsx | 1 + frontend/src/pages/inbounds/AttachClientsModal.tsx | 1 + 3 files changed, 3 insertions(+) diff --git a/frontend/src/pages/clients/BulkAttachInboundsModal.tsx b/frontend/src/pages/clients/BulkAttachInboundsModal.tsx index 7087e80e..5fe9cb70 100644 --- a/frontend/src/pages/clients/BulkAttachInboundsModal.tsx +++ b/frontend/src/pages/clients/BulkAttachInboundsModal.tsx @@ -50,6 +50,7 @@ export default function BulkAttachInboundsModal({ const skipped = result.skipped?.length ?? 0; const errors = result.errors?.length ?? 0; if (errors > 0) { + console.error('[BulkAttach] failures:', result.errors); messageApi.warning( t('pages.inbounds.attachClientsResultMixed', { attached, skipped, errors }), ); diff --git a/frontend/src/pages/clients/BulkDetachInboundsModal.tsx b/frontend/src/pages/clients/BulkDetachInboundsModal.tsx index 0dd6d5fe..f345ca0c 100644 --- a/frontend/src/pages/clients/BulkDetachInboundsModal.tsx +++ b/frontend/src/pages/clients/BulkDetachInboundsModal.tsx @@ -50,6 +50,7 @@ export default function BulkDetachInboundsModal({ const skipped = result.skipped?.length ?? 0; const errors = result.errors?.length ?? 0; if (errors > 0) { + console.error('[BulkDetach] failures:', result.errors); messageApi.warning( t('pages.clients.detachFromInboundsResultMixed', { detached, skipped, errors }), ); diff --git a/frontend/src/pages/inbounds/AttachClientsModal.tsx b/frontend/src/pages/inbounds/AttachClientsModal.tsx index 3df1df5d..cc22cd43 100644 --- a/frontend/src/pages/inbounds/AttachClientsModal.tsx +++ b/frontend/src/pages/inbounds/AttachClientsModal.tsx @@ -128,6 +128,7 @@ export default function AttachClientsModal({ const skipped = result.skipped?.length ?? 0; const errors = result.errors?.length ?? 0; if (errors > 0) { + console.error('[AttachClients] failures:', result.errors); messageApi.warning(t('pages.inbounds.attachClientsResultMixed', { attached, skipped, errors })); } else { messageApi.success(t('pages.inbounds.attachClientsResult', { attached, skipped }));