Skip to content

Commit e6b687d

Browse files
committed
fix: show Failed status for accounts with IMAP disabled due to auth errors
When IMAP is automatically disabled due to exceeding the authentication error threshold, accounts now display a "Failed" badge with the error message instead of appearing as a "sending" account with "Not syncing" status.
1 parent f34e669 commit e6b687d

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

lib/routes-ui.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,15 @@ function formatAccountData(account, gt) {
618618
break;
619619
}
620620

621+
// Check if IMAP was disabled due to errors - override state label to show error
622+
if (account.imap && account.imap.disabled && account.lastErrorState) {
623+
account.stateLabel = {
624+
type: 'danger',
625+
name: 'Failed',
626+
error: account.lastErrorState.description || account.lastErrorState.response
627+
};
628+
}
629+
621630
if (account.oauth2) {
622631
account.oauth2.scopes = []
623632
.concat(account.oauth2.scope || [])

lib/ui-routes/account-routes.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,15 @@ function formatAccountData(account, gt) {
159159
break;
160160
}
161161

162+
// Check if IMAP was disabled due to errors - override state label to show error
163+
if (account.imap && account.imap.disabled && account.lastErrorState) {
164+
account.stateLabel = {
165+
type: 'danger',
166+
name: 'Failed',
167+
error: account.lastErrorState.description || account.lastErrorState.response
168+
};
169+
}
170+
162171
if (account.oauth2) {
163172
account.oauth2.scopes = []
164173
.concat(account.oauth2.scope || [])

0 commit comments

Comments
 (0)