{"record":{"id":"43887505fa8fe979","repo":"actualbudget/actual","slug":"account-needs-attention","errorCode":"ACCOUNT_NEEDS_ATTENTION","errorMessage":"ACCOUNT_NEEDS_ATTENTION","messagePattern":"ACCOUNT_NEEDS_ATTENTION","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/desktop-client/src/accounts/syncStatus.ts","lineNumber":27,"sourceCode":"    status !== 'ok' &&\n    status !== 'pending' &&\n    status !== 'sync-requested'\n  );\n}\n\nexport function getFailedSyncError(\n  account: Pick<AccountEntity, 'bank_sync_status' | 'account_sync_source'>,\n): { type: string; code: string } {\n  switch (account.bank_sync_status) {\n    case 'reauth-required':\n      if (account.account_sync_source === 'simpleFin') {\n        return { type: 'INVALID_ACCESS_TOKEN', code: 'INVALID_ACCESS_TOKEN' };\n      }\n      return { type: 'ITEM_ERROR', code: 'ITEM_LOGIN_REQUIRED' };\n    case 'attention-required':\n      return {\n        type: 'ACCOUNT_NEEDS_ATTENTION',\n        code: 'ACCOUNT_NEEDS_ATTENTION',\n      };\n    case 'rate-limit-exceeded':\n      return { type: 'RATE_LIMIT_EXCEEDED', code: 'RATE_LIMIT_EXCEEDED' };\n    case 'timed-out':\n      return { type: 'TIMED_OUT', code: 'TIMED_OUT' };\n    case 'account-missing':\n      return { type: 'ACCOUNT_MISSING', code: 'ACCOUNT_MISSING' };\n    default:\n      return { type: 'SYNC_ERROR', code: 'SYNC_ERROR' };\n  }\n}\n","sourceCodeStart":9,"sourceCodeEnd":39,"githubUrl":"https://github.com/actualbudget/actual/blob/d4334cb6e6123f4d3bcea1ad6166608884c7e658/packages/desktop-client/src/accounts/syncStatus.ts#L9-L39","documentation":"Returned by getFailedSyncError when an account's bank_sync_status is 'attention-required'. The provider reports the linked account needs user intervention (consent issues, new terms, account-level problem detected by the aggregator) before sync can continue.","triggerScenarios":"Calling getFailedSyncError on an account with bank_sync_status === 'attention-required', regardless of sync source.","commonSituations":"Bank requires accepting new terms in online banking; aggregator flags the account for review; account closed or converted; institution outage leaves the status stuck.","solutions":["Open the account's sync error UI and follow the 'account needs attention' guidance for the provider","Log into online banking directly and resolve any prompts (terms, verification, closure notices)","If the account was closed/converted, update or re-link it to the new account","Check the provider status page for a known institution outage"],"exampleFix":"// before\nconst err = getFailedSyncError(account); // ACCOUNT_NEEDS_ATTENTION\n// after\n// resolve prompts in the bank portal, then:\nawait syncAccount(account.id); // status clears","handlingStrategy":"validation","validationCode":"function needsAttention(account) {\n  return account.bank_sync_status === 'attention-required';\n}","typeGuard":"function isSyncErrorDescriptor(v) {\n  return !!v && typeof v === 'object' && typeof v.type === 'string' && typeof v.code === 'string';\n}","tryCatchPattern":null,"preventionTips":["Watch provider institution status feeds for outages before syncs","Prompt users to resolve in-bank prompts promptly","Handle account closures/conversions by re-linking instead of retrying"],"tags":["bank-sync","account-status"],"backgroundTag":"bank-account-needs-attention","analyzedSha":"d4334cb6e6123f4d3bcea1ad6166608884c7e658","analyzedAt":"2026-08-29T01:02:11.213Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}