{"record":{"id":"7d69c849fec9173c","repo":"actualbudget/actual","slug":"account-with-id-id-not-found","errorCode":null,"errorMessage":"Account with ID ${id} not found.","messagePattern":"Account with ID (.+?) not found\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/loot-core/src/server/accounts/app.ts","lineNumber":1696,"sourceCode":"        errors: [{ message: err.message }],\n        added: [],\n        updated: [],\n        updatedPreview: [],\n      };\n    }\n\n    throw err;\n  }\n}\n\nasync function unlinkAccount({ id }: { id: AccountEntity['id'] }) {\n  const accRow = await db.first<db.DbAccount>(\n    'SELECT * FROM accounts WHERE id = ?',\n    [id],\n  );\n\n  if (!accRow) {\n    throw new Error(`Account with ID ${id} not found.`);\n  }\n\n  const bankId = accRow.bank;\n\n  if (!bankId) {\n    return 'ok';\n  }\n\n  const isGoCardless = accRow.account_sync_source === 'goCardless';\n\n  await db.updateAccount({\n    id,\n    account_id: null,\n    bank: null,\n    balance_current: null,\n    balance_available: null,\n    balance_limit: null,\n    account_sync_source: null,","sourceCodeStart":1678,"sourceCodeEnd":1714,"githubUrl":"https://github.com/actualbudget/actual/blob/d4334cb6e6123f4d3bcea1ad6166608884c7e658/packages/loot-core/src/server/accounts/app.ts#L1678-L1714","documentation":"Error \"Account with ID ${id} not found.\" thrown in actualbudget/actual.","triggerScenarios":"Thrown at packages/loot-core/src/server/accounts/app.ts:1696 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d4334cb6e6123f4d3bcea1ad6166608884c7e658","analyzedAt":"2026-08-29T01:02:11.213Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}