Ver Fonte

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.
MHSanaei há 10 horas atrás
pai
commit
aefee2c15f

+ 1 - 0
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 }),
         );

+ 1 - 0
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 }),
         );

+ 1 - 0
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 }));