actualbudget/actual · error · EnableBankingError

NOT_CONFIGURED

NOT_CONFIGURED

Error message

Enable Banking is not configured

What it means

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.

Source

Thrown at packages/sync-server/src/app-enablebanking/services/enablebanking-service.ts:105

};

// --- PSU headers ---

export type PsuHeaders = {
  'Psu-Ip-Address'?: string;
  'Psu-User-Agent'?: string;
};

// --- Helper functions ---

function getCredentials(): { applicationId: string; secretKey: string } {
  const applicationId = secretsService.get(
    SecretName.enablebanking_applicationId,
  );
  const secretKey = secretsService.get(SecretName.enablebanking_secretKey);

  if (!applicationId || !secretKey) {
    throw new EnableBankingError(
      'INVALID_INPUT',
      'NOT_CONFIGURED',
      'Enable Banking is not configured',
    );
  }

  return { applicationId, secretKey };
}

function getAuthorizationHeader(): string {
  const { applicationId, secretKey } = getCredentials();
  const token = getJWT(applicationId, secretKey);
  return `Bearer ${token}`;
}

const REQUEST_TIMEOUT_MS = 30_000; // 30 seconds

async function request<T>(

View on GitHub (pinned to d4334cb6e6)

Solutions

  1. Set the enablebanking_applicationId and enablebanking_secretKey secrets via the sync-server configuration (secret files or env)
  2. Restart the sync-server after adding the secrets so they are picked up
  3. Verify the secret names match SecretName.enablebanking_* exactly
  4. If Enable Banking is not wanted, use a different bank provider (GoCardless/SimpleFIN/Pluggy) instead

Example fix

// before: no secrets configured
// after (env)
ENABLEBANKING_APPLICATION_ID=xxxxxxxx-xxxx-...
ENABLEBANKING_SECRET_KEY=-----BEGIN RSA PRIVATE KEY-----
...
Defensive patterns

Strategy: validation

Validate before calling

// before calling any Enable Banking API
const appId = secretsService.get(SecretName.enablebanking_applicationId);
const key = secretsService.get(SecretName.enablebanking_secretKey);
const isConfigured = Boolean(appId && key);
if (!isConfigured) throw new Error('Enable Banking secrets missing; set them before use');

Type guard

function isEnableBankingConfigured(s: { applicationId?: string; secretKey?: string }):
  s is { applicationId: string; secretKey: string } {
  return Boolean(s.applicationId && s.secretKey);
}

Try / catch

try {
  await enableBankingService.startAuth(...);
} catch (e) {
  if (e instanceof EnableBankingError && e.code === 'NOT_CONFIGURED') {
    showSetupRequiredMessage('Enable Banking is not configured on this server');
  } else throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "environment variable is not set" and "Missing keys in environment" errors: what missing required env var messages mean and how to fix them — this error's family across 28 libraries.

Related errors


AI-assisted analysis of actualbudget/actual@d4334cb6e6 (2026-08-29). Data as JSON: /api/errors/a770bd77dae5c023. Report an issue: GitHub.