hcengineering/platform · error

Endpoint value is not specified

Error message

Endpoint value is not specified

What it means

createStorageFromConfig in server-storage builds a DatalakeService when the config kind is DATALAKE_CONFIG_KIND. Before constructing the adapter it checks that the DatalakeConfig has an endpoint; if `c.endpoint == null` (undefined or null) it throws this error, because a datalake storage adapter cannot function without a service endpoint URL.

Source

Thrown at foundations/server/packages/server-storage/src/starter.ts:98

export function createStorageFromConfig (config: StorageConfig): StorageAdapter {
  let adapter: StorageAdapter
  const kind = config.kind
  if (kind === MINIO_CONFIG_KIND) {
    const c = config as MinioConfig
    if (c.endpoint == null || c.accessKey == null || c.secretKey == null) {
      throw new Error('One of endpoint/accessKey/secretKey values are not specified')
    }
    adapter = new MinioService(c)
  } else if (kind === S3_CONFIG_KIND) {
    const c = config as S3Config
    if (c.endpoint == null || c.accessKey == null || c.secretKey == null) {
      throw new Error('One of endpoint/accessKey/secretKey values are not specified')
    }
    adapter = new S3Service(c)
  } else if (kind === DATALAKE_CONFIG_KIND) {
    const c = config as DatalakeConfig
    if (c.endpoint == null) {
      throw new Error('Endpoint value is not specified')
    }
    adapter = new DatalakeService(c)
  } else if (kind === HULYLAKE_CONFIG_KIND) {
    const c = config as HulylakeConfig
    if (c.endpoint == null) {
      throw new Error('Endpoint value is not specified')
    }
    adapter = new HulylakeService(c)
  } else {
    throw new Error('Unsupported storage kind:' + kind)
  }

  if (config.readonly === 'true') {
    adapter = new ReadonlyStorageAdapter(adapter)
  }

  return adapter
}

View on GitHub (pinned to 63e28dc964)

Solutions

  1. Add a valid endpoint URL to the DatalakeConfig object passed to createStorageFromConfig
  2. Check where the config is loaded (DB workspace config, env vars) and ensure the endpoint field is populated
  3. Validate the config before calling createStorageFromConfig

Example fix

// before
const config = { kind: 'datalake', readOnly: 'false' }
createStorageFromConfig(config)
// after
const config = { kind: 'datalake', endpoint: 'https://datalake.example.com', readOnly: 'false' }
if (config.endpoint == null) throw new Error('datalake endpoint missing')
createStorageFromConfig(config)
Defensive patterns

Strategy: validation

Validate before calling

function assertDatalakeConfig(cfg) {
  if (cfg.kind === 'datalake' && (cfg.endpoint == null || cfg.endpoint === '')) {
    throw new Error(`datalake config requires endpoint, got: ${cfg.endpoint}`)
  }
}

Type guard

function isDatalakeConfig(c) {
  return typeof c === 'object' && c !== null && c.kind === 'datalake' &&
    typeof c.endpoint === 'string' && c.endpoint.length > 0
}

Try / catch

try {
  adapter = createStorageFromConfig(cfg)
} catch (e) {
  if (e.message === 'Endpoint value is not specified') {
    throw new Error(`storage config for kind '${cfg.kind}' is missing endpoint`)
  }
  throw e
}

Prevention

When it happens

Trigger: Calling createStorageFromConfig(config) where config.kind === DATALAKE_CONFIG_KIND but config.endpoint is undefined or null — e.g. a workspace/storage config loaded from DB or env that omitted the endpoint field.

Common situations: Hand-written storage config JSON missing 'endpoint'; env-driven config where the endpoint variable was never set; config migrated from another storage kind that has no endpoint field.

Related errors


AI-assisted analysis of hcengineering/platform@63e28dc964 (2026-08-29). Data as JSON: /api/errors/20e596654c01d2a5. Report an issue: GitHub.