mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-05-31 18:24:10 +00:00
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:
parent
b42a4d93fc
commit
aefee2c15f
3 changed files with 3 additions and 0 deletions
|
|
@ -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 }),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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 }),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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 }));
|
||||
|
|
|
|||
Loading…
Reference in a new issue