xai-org/x-algorithm · error · ConfigFailure

invalid request timeout value ${config.requestTimeoutMillis}

Error message

invalid request timeout value ${config.requestTimeoutMillis} in thrift endpoint ${config.endpoint}

What it means

ConfigFailure thrown when a ThriftEndpointConfig explicitly sets requestTimeoutMillis <= 0. Same guard pattern as the session timeout: only fires when the field is present in the config.

Source

Thrown at botmaker/botmaker_thrift/src/main/scala/com/twitter/botmaker/runtime/config/ThriftEndpointConfigs.scala:61

  final def getThriftEndpoints: Seq[ThriftEndpointConfig] = thriftEndpoints.toSeq

  final def getThriftEndpoint(endpoint: String): Option[ThriftEndpointConfig] =
    thriftEndpoints.filter(_.endpoint == endpoint).headOption

  final def addThriftEndpoint(config: ThriftEndpointConfig): Unit = {

    unique(Endpoint, config.endpoint)

    validateEndpoint(config.endpoint)
    if (config.isSetSessionTimeoutMillis && config.sessionTimeoutMillis <= 0) {
      throw ConfigFailure(
        s"invalid session timeout value ${config.sessionTimeoutMillis} in thrift endpoint ${config.endpoint}"
      )
    }

    if (config.isSetRequestTimeoutMillis && config.requestTimeoutMillis <= 0) {
      throw ConfigFailure(
        s"invalid request timeout value ${config.requestTimeoutMillis} in thrift endpoint ${config.endpoint}"
      )
    }

    config.methods.asScala foreach { tm =>
      unique(FuncName, config.endpoint, tm.funcName)
      validateFuncName(tm.funcName)
      if (tm.isSetTimeoutMillis && tm.timeoutMillis <= 0) {
        throw ConfigFailure(
          s"invalid timeout value ${tm.timeoutMillis} in thrift method ${tm.funcName} of ${config.endpoint}"
        )
      }

    }

    thriftEndpoints.append(config)
  }

View on GitHub (pinned to 24c60942c5)

Solutions

  1. Use a positive request_timeout_millis value or omit it
  2. If intent was 'no override', delete the key from config

Example fix

# before
request_timeout_millis: 0
# after
request_timeout_millis: 5000  # or omit
Defensive patterns

Strategy: validation

Validate before calling

require(!config.isSetRequestTimeoutMillis || config.requestTimeoutMillis > 0)

Try / catch

catch { case e: ConfigFailure => fail config load with endpoint name and value }

Prevention

When it happens

Trigger: Adding a thrift endpoint with request_timeout_millis set to 0 or negative.

Common situations: Placeholder zero in templated configs; disabling timeouts by setting 0 (not supported — omit the field instead).

Understand the failure class

Related errors


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