{"record":{"id":"4eae02dfd940adbb","repo":"xai-org/x-algorithm","slug":"invalid-session-timeout-value-config-sessiontime","errorCode":null,"errorMessage":"invalid session timeout value ${config.sessionTimeoutMillis} in thrift endpoint ${config.endpoint}","messagePattern":"invalid session timeout value (.+?) in thrift endpoint (.+?)","errorType":"validation","errorClass":"ConfigFailure","httpStatus":null,"severity":"error","filePath":"botmaker/botmaker_thrift/src/main/scala/com/twitter/botmaker/runtime/config/ThriftEndpointConfigs.scala","lineNumber":55,"sourceCode":"  }\n}\n\ntrait ThriftEndpointConfigs extends ServiceConfigs {\n\n  private final val thriftEndpoints = ArrayBuffer[ThriftEndpointConfig]()\n\n  final def getThriftEndpoints: Seq[ThriftEndpointConfig] = thriftEndpoints.toSeq\n\n  final def getThriftEndpoint(endpoint: String): Option[ThriftEndpointConfig] =\n    thriftEndpoints.filter(_.endpoint == endpoint).headOption\n\n  final def addThriftEndpoint(config: ThriftEndpointConfig): Unit = {\n\n    unique(Endpoint, config.endpoint)\n\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      }","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/xai-org/x-algorithm/blob/24c60942c5c5fdad3a6addffb4c6e6d2f228f04f/botmaker/botmaker_thrift/src/main/scala/com/twitter/botmaker/runtime/config/ThriftEndpointConfigs.scala#L37-L73","documentation":"ConfigFailure thrown when a ThriftEndpointConfig explicitly sets sessionTimeoutMillis to a value <= 0. The check only applies when the field is set (isSetSessionTimeoutMillis), so it catches negative/zero overrides rather than unset defaults.","triggerScenarios":"Adding a thrift endpoint with session_timeout_millis: 0 or a negative number in config or in the addThriftEndpoint call.","commonSituations":"Copy-pasted config with a 0 placeholder meant to mean 'default'; arithmetic computing the timeout that underflows to 0/negative.","solutions":["Set sessionTimeoutMillis to a positive millisecond value, or remove the field entirely to use the default","Grep config files for session_timeout_millis: 0 / negative values"],"exampleFix":"# before\nsession_timeout_millis: 0\n# after\nsession_timeout_millis: 10000  # or omit the field","handlingStrategy":"validation","validationCode":"require(!config.isSetSessionTimeoutMillis || config.sessionTimeoutMillis > 0)","typeGuard":null,"tryCatchPattern":"catch { case e: ConfigFailure => point operators at the endpoint's session_timeout_millis value }","preventionTips":["Never use 0 as 'use default' — omit the field","Schema-validate numeric config ranges (positive ints) in CI"],"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"}