{"record":{"id":"1bbddd6585aa6e46","repo":"redis/node-redis","slug":"no-endpoints-found-in-database-config","errorCode":null,"errorMessage":"No endpoints found in database config","messagePattern":"No endpoints found in database config","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/test-utils/lib/fault-injector/fault-injector-client.ts","lineNumber":308,"sourceCode":"    dbg('createDatabase: cluster', clusterIndex);\n    const action = await this.triggerAction({\n      type: \"create_database\",\n      parameters: {\n        cluster_index: clusterIndex,\n        database_config: databaseConfig,\n      },\n    });\n\n    const dbConfig =\n      typeof action.output === \"object\"\n        ? action.output\n        : JSON.parse(action.output);\n\n    const rawEndpoints = dbConfig.raw_endpoints[0];\n\n    if (!rawEndpoints) {\n      dbg('No endpoints found');\n      throw new Error(\"No endpoints found in database config\");\n    }\n\n    const result = {\n      host: rawEndpoints.dns_name,\n      port: rawEndpoints.port,\n      password: dbConfig.password,\n      username: dbConfig.username,\n      tls: dbConfig.tls,\n      bdbId: dbConfig.bdb_id,\n    };\n    dbg('created:', result.host + ':' + result.port, 'bdb', result.bdbId);\n    this.selectDbConfig(result);\n\n    return result;\n  }\n\n}\n","sourceCodeStart":290,"sourceCodeEnd":326,"githubUrl":"https://github.com/redis/node-redis/blob/90fd0652bc3f2a0a1b2f79fa9096b02a86b0ac58/packages/test-utils/lib/fault-injector/fault-injector-client.ts#L290-L326","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Inspect the full action.output by calling getActionStatus(action_id) after a failure to see what the backend returned","Check cluster capacity / health and retry createAndSelectDatabase","Confirm the fault-injector backend version matches the client's expected output schema"],"exampleFix":"// before\nconst db = await fi.createAndSelectDatabase({ name: 'test' });\n// Error: No endpoints found in database config\n\n// after — inspect the raw action output to debug\nconst a = await fi.getActionStatus(lastActionId);\nconsole.log(JSON.stringify(a.output, null, 2));\n// then reconcile schema/capacity and retry","handlingStrategy":"validation","validationCode":"function hasRawEndpoints(output: unknown): output is { raw_endpoints: unknown[] } {\n  return typeof output === 'object' && output !== null\n      && Array.isArray((output as any).raw_endpoints)\n      && (output as any).raw_endpoints.length > 0;\n}","typeGuard":"function isDatabaseConfig(v: unknown): v is DatabaseConfig {\n  return typeof v === 'object' && v !== null\n      && Array.isArray((v as any).raw_endpoints)\n      && (v as any).raw_endpoints.length > 0;\n}","tryCatchPattern":"try {\n  const db = await fi.createAndSelectDatabase(cfg);\n} catch (e) {\n  if (e instanceof Error && /No endpoints found in database config/.test(e.message)) {\n  }\n  throw e;\n}","preventionTips":["Inspect action.output via getActionStatus after a failure to see the backend's actual response shape","Confirm cluster capacity before creating databases","Pin the fault-injector backend version to match the client's expected output schema"],"tags":["fault-injection","database","test-utils","configuration"],"backgroundTag":null,"analyzedSha":"90fd0652bc3f2a0a1b2f79fa9096b02a86b0ac58","analyzedAt":"2026-08-11T15:37:21.243Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}