{"record":{"id":"dfb986150b0d61db","repo":"actualbudget/actual","slug":"results-error","errorCode":null,"errorMessage":"results.error","messagePattern":"results\\.error","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/desktop-client/src/components/banksync/useBuiltInBankSyncProviders.ts","lineNumber":504,"sourceCode":"    isEnableBankingSetupComplete,\n    onEnableBankingInit,\n    t,\n    upgradingAccountId,\n  ]);\n\n  const onConnectPluggyAi = useCallback(async () => {\n    if (!pluggyAiStatus.configured) {\n      onPluggyAiInit();\n      return;\n    }\n\n    try {\n      const results = await send('pluggyai-accounts');\n      if (results.error_code) {\n        throw new Error(results.reason);\n      }\n      if ('error' in results) {\n        throw new Error(results.error);\n      }\n\n      const externalAccounts = (results.accounts as PluggyAiAccount[]).map(\n        oldAccount => ({\n          account_id: oldAccount.id,\n          name: `${oldAccount.name.trim()} - ${\n            oldAccount.type === 'BANK' ? oldAccount.taxNumber : oldAccount.owner\n          }`,\n          institution: oldAccount.name,\n          orgDomain: null,\n          orgId: oldAccount.id,\n          balance:\n            oldAccount.type === 'BANK'\n              ? oldAccount.bankData.automaticallyInvestedBalance +\n                oldAccount.bankData.closingBalance\n              : oldAccount.balance,\n        }),\n      );","sourceCodeStart":486,"sourceCodeEnd":522,"githubUrl":"https://github.com/actualbudget/actual/blob/d4334cb6e6123f4d3bcea1ad6166608884c7e658/packages/desktop-client/src/components/banksync/useBuiltInBankSyncProviders.ts#L486-L522","documentation":"If the 'pluggyai-accounts' response carries an 'error' field instead of an error_code, it is thrown directly as the error message. This handles generic/unstructured Pluggy.ai proxy failures.","triggerScenarios":"The 'pluggyai-accounts' IPC returns { error: '...' } with no error_code — typically an exception message or HTTP error body captured by the sync server while calling Pluggy.ai.","commonSituations":"Pluggy.ai 5xx responses; server-side exception during account listing; credentials present but the Pluggy item/session cannot be created.","solutions":["Read the thrown message (results.error) and the sync-server logs to identify the Pluggy.ai failure","Re-authenticate Pluggy.ai credentials in provider settings","Retry after confirming Pluggy.ai status (status.outage incidents)","Check that the stored clientId/secret correspond to a valid Pluggy.ai account"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"const res = await send('pluggyai-accounts');\nif ('error' in res && res.error) {\n  throw new Error(res.error);\n}","typeGuard":"const hasErrorField = (r: object): r is { error: string } =>\n  'error' in r && typeof (r as { error?: unknown }).error === 'string';","tryCatchPattern":"try {\n  await loadPluggyAiAccounts();\n} catch (e) {\n  logger.error('Pluggy.ai proxy error', e);\n  notify('Pluggy.ai account fetch failed; see server logs.');\n}","preventionTips":["Re-authenticate Pluggy.ai when credentials change","Confirm the stored credentials belong to an active Pluggy.ai account","Capture sync-server logs to correlate the error string with the HTTP failure"],"tags":["banksync","pluggyai","api-error"],"backgroundTag":"bank-sync-provider-error","analyzedSha":"d4334cb6e6123f4d3bcea1ad6166608884c7e658","analyzedAt":"2026-08-29T01:02:11.213Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}