{"record":{"id":"aa7c36a24153728c","repo":"actualbudget/actual","slug":"timed-out-aa7c36","errorCode":"TIMED_OUT","errorMessage":"TIMED_OUT","messagePattern":"TIMED_OUT","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/desktop-client/src/accounts/syncStatus.ts","lineNumber":32,"sourceCode":"\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":14,"sourceCodeEnd":39,"githubUrl":"https://github.com/actualbudget/actual/blob/d4334cb6e6123f4d3bcea1ad6166608884c7e658/packages/desktop-client/src/accounts/syncStatus.ts#L14-L39","documentation":"Returned by getFailedSyncError when bank_sync_status is 'timed-out'. The last synchronization request exceeded the allowed time window — the bank or aggregator did not respond in time, so the sync failed on a deadline rather than a credential problem.","triggerScenarios":"Calling getFailedSyncError on an account with bank_sync_status === 'timed-out' after a sync request aborted on a deadline.","commonSituations":"Slow or degraded bank APIs; aggregator timeouts during maintenance windows; very large transaction history fetches; network interruptions between server and provider.","solutions":["Retry the sync later — timeouts are usually transient","Retry outside the bank's maintenance window if known","Reduce initial transaction history span to shorten the sync request","Check the provider status page / server network connectivity if it recurs"],"exampleFix":"// before\nawait syncAccount(account.id); // times out again immediately\n// after\nif (getFailedSyncError(account).code === 'TIMED_OUT') {\n  await sleep(backoffMinutes(5));\n  await syncAccount(account.id); // retry after backoff\n}","handlingStrategy":"retry","validationCode":"const err = getFailedSyncError(account);\nif (err.code === 'TIMED_OUT') {\n  // schedule a delayed retry\n}","typeGuard":"function isTimedOut(v) {\n  return !!v && typeof v === 'object' && v.code === 'TIMED_OUT';\n}","tryCatchPattern":null,"preventionTips":["Use exponential backoff for timed-out syncs","Avoid syncing during known bank maintenance windows","Limit initial history fetch size to shorten sync requests"],"tags":["bank-sync","timeout"],"backgroundTag":"request-timeout","analyzedSha":"d4334cb6e6123f4d3bcea1ad6166608884c7e658","analyzedAt":"2026-08-29T01:02:11.213Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}