{"record":{"id":"c1cc07de0888df71","repo":"actualbudget/actual","slug":"getsyncerror-result-error-reason-id-result-error","errorCode":null,"errorMessage":"getSyncError(result.error.reason, id, result.error.meta)","messagePattern":"getSyncError\\(result\\.error\\.reason, id, result\\.error\\.meta\\)","errorType":"error_code","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/loot-core/src/server/api.ts","lineNumber":279,"sourceCode":"    );\n  }\n  await handlers['load-budget']({ id: result.id });\n};\n\nhandlers['api/get-budgets'] = async function () {\n  const budgets = await handlers['get-budgets']();\n  const files = (await handlers['get-remote-files']()) || [];\n  return [\n    ...budgets.map(file => budgetModel.toExternal(file)),\n    ...files.map(file => remoteFileModel.toExternal(file)).filter(file => file),\n  ];\n};\n\nhandlers['api/sync'] = async function () {\n  const { id } = prefs.getPrefs();\n  const result = await handlers['sync-budget']();\n  if (result.error) {\n    throw withErrorCode(\n      new Error(getSyncError(result.error.reason, id, result.error.meta)),\n      result.error.reason,\n    );\n  }\n};\n\nhandlers['api/bank-sync'] = async function (args) {\n  const batchSync = args?.accountId == null;\n  const allErrors = [];\n\n  if (!batchSync) {\n    const { errors } = await handlers['accounts-bank-sync']({\n      ids: [args.accountId],\n    });\n\n    allErrors.push(...errors);\n  } else {\n    const accountsData = await handlers['accounts-get']();","sourceCodeStart":261,"sourceCodeEnd":297,"githubUrl":"https://github.com/actualbudget/actual/blob/d4334cb6e6123f4d3bcea1ad6166608884c7e658/packages/loot-core/src/server/api.ts#L261-L297","documentation":"Error \"getSyncError(result.error.reason, id, result.error.meta)\" thrown in actualbudget/actual.","triggerScenarios":"Thrown at packages/loot-core/src/server/api.ts:279 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"}