{"record":{"id":"4236c1f2e58b7a6a","repo":"actualbudget/actual","slug":"account-missing","errorCode":"ACCOUNT_MISSING","errorMessage":"ACCOUNT_MISSING","messagePattern":"ACCOUNT_MISSING","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/desktop-client/src/accounts/syncStatus.ts","lineNumber":34,"sourceCode":"  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":16,"sourceCodeEnd":39,"githubUrl":"https://github.com/actualbudget/actual/blob/d4334cb6e6123f4d3bcea1ad6166608884c7e658/packages/desktop-client/src/accounts/syncStatus.ts#L16-L39","documentation":"Returned by getFailedSyncError for bank_sync_status 'account-missing'. The aggregator can no longer find the linked account in the list returned by the bank — typically because the account was closed, renamed, or the provider's account enumeration changed.","triggerScenarios":"Calling getFailedSyncError on an account with bank_sync_status === 'account-missing', usually right after a bank refresh where the remote account id no longer exists in the provider response.","commonSituations":"User closed the account at the bank; bank reissued the account with a new id; aggregator stopped returning the account (hidden or restricted); institution migrations temporarily remove accounts from the API.","solutions":["Confirm in online banking whether the account still exists and its id changed","If replaced, re-link the account to its new counterpart via the Re-link flow","If closed, unlink the bank sync from the account and keep it as a manual account","Check the provider dashboard for enumeration changes or migration notices"],"exampleFix":"// before\nawait syncAccount(account.id); // ACCOUNT_MISSING every time\n// after\nif (getFailedSyncError(account).code === 'ACCOUNT_MISSING') {\n  await relinkAccount(account.id); // bind to the new remote account id\n}","handlingStrategy":"validation","validationCode":"function isAccountMissing(account) {\n  return getFailedSyncError(account).code === 'ACCOUNT_MISSING';\n}","typeGuard":"function isAccountMissingError(v) {\n  return !!v && typeof v === 'object' && v.code === 'ACCOUNT_MISSING';\n}","tryCatchPattern":null,"preventionTips":["Reconcile remote account ids after any bank-side account change","Stop auto-syncing accounts flagged 'account-missing' until re-linked","Alert users quickly so they can re-link or unlink closed accounts"],"tags":["bank-sync","account-missing"],"backgroundTag":"bank-account-missing","analyzedSha":"d4334cb6e6123f4d3bcea1ad6166608884c7e658","analyzedAt":"2026-08-29T01:02:11.213Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}