redis/node-redis · error · Error

No endpoints found in database config

Error message

No endpoints found in database config

What it means

createAndSelectDatabase triggers a create_database action, then parses action.output and reads raw_endpoints[0]. If the created database returned no raw endpoints (empty array or undefined), this error is thrown before constructing the connection config.

Source

Thrown at packages/test-utils/lib/fault-injector/fault-injector-client.ts:308

    dbg('createDatabase: cluster', clusterIndex);
    const action = await this.triggerAction({
      type: "create_database",
      parameters: {
        cluster_index: clusterIndex,
        database_config: databaseConfig,
      },
    });

    const dbConfig =
      typeof action.output === "object"
        ? action.output
        : JSON.parse(action.output);

    const rawEndpoints = dbConfig.raw_endpoints[0];

    if (!rawEndpoints) {
      dbg('No endpoints found');
      throw new Error("No endpoints found in database config");
    }

    const result = {
      host: rawEndpoints.dns_name,
      port: rawEndpoints.port,
      password: dbConfig.password,
      username: dbConfig.username,
      tls: dbConfig.tls,
      bdbId: dbConfig.bdb_id,
    };
    dbg('created:', result.host + ':' + result.port, 'bdb', result.bdbId);
    this.selectDbConfig(result);

    return result;
  }

}

View on GitHub (pinned to 90fd0652bc)

Solutions

  1. Inspect the full action.output by calling getActionStatus(action_id) after a failure to see what the backend returned
  2. Check cluster capacity / health and retry createAndSelectDatabase
  3. Confirm the fault-injector backend version matches the client's expected output schema

Example fix

// before
const db = await fi.createAndSelectDatabase({ name: 'test' });
// Error: No endpoints found in database config

// after — inspect the raw action output to debug
const a = await fi.getActionStatus(lastActionId);
console.log(JSON.stringify(a.output, null, 2));
// then reconcile schema/capacity and retry
Defensive patterns

Strategy: validation

Validate before calling

function hasRawEndpoints(output: unknown): output is { raw_endpoints: unknown[] } {
  return typeof output === 'object' && output !== null
      && Array.isArray((output as any).raw_endpoints)
      && (output as any).raw_endpoints.length > 0;
}

Type guard

function isDatabaseConfig(v: unknown): v is DatabaseConfig {
  return typeof v === 'object' && v !== null
      && Array.isArray((v as any).raw_endpoints)
      && (v as any).raw_endpoints.length > 0;
}

Try / catch

try {
  const db = await fi.createAndSelectDatabase(cfg);
} catch (e) {
  if (e instanceof Error && /No endpoints found in database config/.test(e.message)) {
  }
  throw e;
}

Prevention

When it happens

Trigger: The fault-injector created the database but the cluster returned no endpoints (cluster out of capacity, endpoints not yet provisioned, or the action output shape differs from expected raw_endpoints array).

Common situations: Cluster at database limit; race where endpoints are queried before allocation completes; backend version returning a different output schema (e.g., 'endpoints' instead of 'raw_endpoints'); action.output was an error string that parsed to an object without raw_endpoints.

Related errors


AI-assisted analysis of redis/node-redis@90fd0652bc (2026-08-11). Data as JSON: /api/errors/1bbddd6585aa6e46. Report an issue: GitHub.