{"record":{"id":"c1993bd330867b4c","repo":"xai-org/x-algorithm","slug":"invalid-timeout-value-tm-timeoutmillis-in-thrif","errorCode":null,"errorMessage":"invalid timeout value ${tm.timeoutMillis} in thrift method ${tm.funcName} of ${config.endpoint}","messagePattern":"invalid timeout value (.+?) in thrift method (.+?) of (.+?)","errorType":"validation","errorClass":"ConfigFailure","httpStatus":null,"severity":"error","filePath":"botmaker/botmaker_thrift/src/main/scala/com/twitter/botmaker/runtime/config/ThriftEndpointConfigs.scala","lineNumber":70,"sourceCode":"\n    validateEndpoint(config.endpoint)\n    if (config.isSetSessionTimeoutMillis && config.sessionTimeoutMillis <= 0) {\n      throw ConfigFailure(\n        s\"invalid session timeout value ${config.sessionTimeoutMillis} in thrift endpoint ${config.endpoint}\"\n      )\n    }\n\n    if (config.isSetRequestTimeoutMillis && config.requestTimeoutMillis <= 0) {\n      throw ConfigFailure(\n        s\"invalid request timeout value ${config.requestTimeoutMillis} in thrift endpoint ${config.endpoint}\"\n      )\n    }\n\n    config.methods.asScala foreach { tm =>\n      unique(FuncName, config.endpoint, tm.funcName)\n      validateFuncName(tm.funcName)\n      if (tm.isSetTimeoutMillis && tm.timeoutMillis <= 0) {\n        throw ConfigFailure(\n          s\"invalid timeout value ${tm.timeoutMillis} in thrift method ${tm.funcName} of ${config.endpoint}\"\n        )\n      }\n\n    }\n\n    thriftEndpoints.append(config)\n  }\n\n  protected def mux[Iface: ClassTag](\n    endpoint: String,\n    servicePath: String,\n    clientId: String,\n    sessionTimeout: Duration,\n    requestTimeout: Duration,\n    retries: Int\n  ): Unit = {\n    val ctag = implicitly[ClassTag[Iface]]","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/xai-org/x-algorithm/blob/24c60942c5c5fdad3a6addffb4c6e6d2f228f04f/botmaker/botmaker_thrift/src/main/scala/com/twitter/botmaker/runtime/config/ThriftEndpointConfigs.scala#L52-L88","documentation":"ConfigFailure thrown when a per-method timeoutMillis on a thrift endpoint config is explicitly set to <= 0. Each method config (tm) is validated after endpoint-level checks.","triggerScenarios":"Declaring a method in a thrift endpoint with timeout_millis: 0 or a negative value.","commonSituations":"Method-level override blocks copied with 0 defaults; YAML indentation putting the timeout under the wrong method.","solutions":["Set a positive timeout_millis on the method, or remove it to inherit the endpoint default","Check indentation so the value applies to the intended method"],"exampleFix":"# before\nmethods:\n  - func_name: getTweet\n    timeout_millis: 0\n# after\nmethods:\n  - func_name: getTweet\n    timeout_millis: 300","handlingStrategy":"validation","validationCode":"config.methods.asScala.foreach(tm => require(!tm.isSetTimeoutMillis || tm.timeoutMillis > 0, tm.funcName))","typeGuard":null,"tryCatchPattern":"catch { case e: ConfigFailure => include endpoint + funcName in deployment error output }","preventionTips":["Generate method blocks from a checked template","Validate per-method timeouts in config unit tests"],"tags":["thrift","scala","config-validation","timeout"],"backgroundTag":"invalid-timeout-config","analyzedSha":"24c60942c5c5fdad3a6addffb4c6e6d2f228f04f","analyzedAt":"2026-08-28T11:40:14.686Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}