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.
This commit is contained in:
MHSanaei
2026-05-28 15:18:33 +02:00
parent b42a4d93fc
commit aefee2c15f
3 changed files with 3 additions and 0 deletions

View File

@@ -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 }),
);

View File

@@ -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 }),
);

View File

@@ -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 }));