{"record":{"id":"a770bd77dae5c023","repo":"actualbudget/actual","slug":"not-configured","errorCode":"NOT_CONFIGURED","errorMessage":"Enable Banking is not configured","messagePattern":"Enable Banking is not configured","errorType":"error_code","errorClass":"EnableBankingError","httpStatus":null,"severity":"error","filePath":"packages/sync-server/src/app-enablebanking/services/enablebanking-service.ts","lineNumber":105,"sourceCode":"};\n\n// --- PSU headers ---\n\nexport type PsuHeaders = {\n  'Psu-Ip-Address'?: string;\n  'Psu-User-Agent'?: string;\n};\n\n// --- Helper functions ---\n\nfunction getCredentials(): { applicationId: string; secretKey: string } {\n  const applicationId = secretsService.get(\n    SecretName.enablebanking_applicationId,\n  );\n  const secretKey = secretsService.get(SecretName.enablebanking_secretKey);\n\n  if (!applicationId || !secretKey) {\n    throw new EnableBankingError(\n      'INVALID_INPUT',\n      'NOT_CONFIGURED',\n      'Enable Banking is not configured',\n    );\n  }\n\n  return { applicationId, secretKey };\n}\n\nfunction getAuthorizationHeader(): string {\n  const { applicationId, secretKey } = getCredentials();\n  const token = getJWT(applicationId, secretKey);\n  return `Bearer ${token}`;\n}\n\nconst REQUEST_TIMEOUT_MS = 30_000; // 30 seconds\n\nasync function request<T>(","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/actualbudget/actual/blob/d4334cb6e6123f4d3bcea1ad6166608884c7e658/packages/sync-server/src/app-enablebanking/services/enablebanking-service.ts#L87-L123","documentation":"EnableBankingService.getCredentials reads the enablebanking_applicationId and enablebanking_secretKey secrets. If either is missing or empty it throws EnableBankingError('INVALID_INPUT','NOT_CONFIGURED','Enable Banking is not configured') because the provider integration cannot authenticate without them.","triggerScenarios":"Any Enable Banking API call requiring credentials when secrets enablebanking_applicationId or enablebanking_secretKey are not set — e.g. starting a bank-link session before configuration, or after secrets were dropped from the environment/config.","commonSituations":"Self-hosted sync-server deployed without Enable Banking secrets; secrets stored under wrong names or in a different secret store; upgrading to the Enable Banking feature without running configuration; docker env vars not passed into the container.","solutions":["Set the enablebanking_applicationId and enablebanking_secretKey secrets via the sync-server configuration (secret files or env)","Restart the sync-server after adding the secrets so they are picked up","Verify the secret names match SecretName.enablebanking_* exactly","If Enable Banking is not wanted, use a different bank provider (GoCardless/SimpleFIN/Pluggy) instead"],"exampleFix":"// before: no secrets configured\n// after (env)\nENABLEBANKING_APPLICATION_ID=xxxxxxxx-xxxx-...\nENABLEBANKING_SECRET_KEY=-----BEGIN RSA PRIVATE KEY-----\n...","handlingStrategy":"validation","validationCode":"// before calling any Enable Banking API\nconst appId = secretsService.get(SecretName.enablebanking_applicationId);\nconst key = secretsService.get(SecretName.enablebanking_secretKey);\nconst isConfigured = Boolean(appId && key);\nif (!isConfigured) throw new Error('Enable Banking secrets missing; set them before use');","typeGuard":"function isEnableBankingConfigured(s: { applicationId?: string; secretKey?: string }):\n  s is { applicationId: string; secretKey: string } {\n  return Boolean(s.applicationId && s.secretKey);\n}","tryCatchPattern":"try {\n  await enableBankingService.startAuth(...);\n} catch (e) {\n  if (e instanceof EnableBankingError && e.code === 'NOT_CONFIGURED') {\n    showSetupRequiredMessage('Enable Banking is not configured on this server');\n  } else throw e;\n}","preventionTips":["Provision both secrets at deploy time; fail fast with a startup config check","Verify secret names/envs after every deployment","Keep secrets in a persistent store so container restarts don't lose them","Offer users a fallback bank provider when Enable Banking is unconfigured"],"tags":["configuration","enablebanking","missing-secret","sync-server"],"backgroundTag":"missing-env-var","analyzedSha":"d4334cb6e6123f4d3bcea1ad6166608884c7e658","analyzedAt":"2026-08-29T01:02:11.213Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}