xai-org/x-algorithm · error · ConfigFailure

servicePath is not set for MemCachedEndpointConfig ${config.

Error message

servicePath is not set for MemCachedEndpointConfig ${config.endpoint}

What it means

ConfigFailure thrown when registering a MemCachedEndpointConfig whose servicePath field is empty. servicePath is mandatory for memcached endpoints because it identifies the dest/timeout used for client resolution.

Source

Thrown at botmaker/botmaker_memcached/src/main/scala/com/twitter/botmaker/runtime/config/MemCachedEndpointConfigs.scala:37

    context.getRuntime.addMemCachedEndpoint(config)
    config
  }
}

trait MemCachedEndpointConfigs extends ServiceConfigs {

  final protected val memCachedEndpoints: ArrayBuffer[MemCachedEndpointConfig] =
    ArrayBuffer[MemCachedEndpointConfig]()

  final def getMemCachedEndpoints: Seq[MemCachedEndpointConfig] = memCachedEndpoints.toSeq

  final def addMemCachedEndpoint(config: MemCachedEndpointConfig): Unit = {
    unique(Endpoint, config.endpoint)

    validateEndpoint(config.endpoint)

    if (config.servicePath.isEmpty) {
      throw ConfigFailure(
        s"servicePath is not set for MemCachedEndpointConfig ${config.endpoint}"
      )
    }

    memCachedEndpoints.append(config)
  }

  override def debug(dbg: RuntimeDebugger): Unit = {
    super.debug(dbg)

    dbg.open("memCachedEndpoints", memCachedEndpoints) foreach { d =>
      memCachedEndpoints foreach { mc => d.info(mc.endpoint, mc.toString) }
    }
  }
}

View on GitHub (pinned to 24c60942c5)

Solutions

  1. Set a non-empty servicePath (e.g. /s/services/memcache-foo) on the endpoint config
  2. Validate required fields in your config loader before calling addMemCachedEndpoint

Example fix

# before
endpoint:
  endpoint: memcache-events
# after
endpoint:
  endpoint: memcache-events
  service_path: /s/services/memcache-events
Defensive patterns

Strategy: validation

Validate before calling

require(config.servicePath.nonEmpty, s"servicePath required for ${config.endpoint}")

Try / catch

catch { case e: ConfigFailure => report the endpoint missing servicePath in the config source }

Prevention

When it happens

Trigger: Calling addMemCachedEndpoint with a config where servicePath = "" (or unset, since an empty string is the default for optional string fields in thrift-config structs).

Common situations: YAML/JSON config omitting service_path; config templating leaving it blank; copy-pasting a template endpoint without filling the path.

Related errors


AI-assisted analysis of xai-org/x-algorithm@24c60942c5 (2026-08-28). Data as JSON: /api/errors/6231b307bee05d87. Report an issue: GitHub.