{"record":{"id":"fe8cd19fd71f9030","repo":"xai-org/x-algorithm","slug":"endpoint-endpoint-does-not-match-endpointregex","errorCode":null,"errorMessage":"Endpoint '$endpoint' does not match $endpointRegex.","messagePattern":"Endpoint '\\$endpoint' does not match \\$endpointRegex\\.","errorType":"validation","errorClass":"ConfigFailure","httpStatus":null,"severity":"error","filePath":"botmaker/src/scala/com/twitter/botmaker/runtime/config/ServiceConfigs.scala","lineNumber":89,"sourceCode":"    if (fieldNameRegex.findFirstIn(fieldName).isEmpty) {\n      throw ConfigFailure(\n        s\"Field name '$fieldName' does not match $fieldNameRegex.\"\n      )\n    }\n  }\n\n  def validateFuncName(funcName: String): Unit = {\n    if (funcNameRegex.findFirstIn(funcName).isEmpty) {\n      throw ConfigFailure(\n        s\"Func name '$funcName' does not match $funcNameRegex.\"\n      )\n    }\n  }\n\n  def validateEndpoint(endpoint: String): Unit = {\n    if (endpoint != \"ScribeClient\"\n      && endpointRegex.findFirstIn(endpoint).isEmpty) {\n      throw ConfigFailure(\n        s\"Endpoint '$endpoint' does not match $endpointRegex.\"\n      )\n    }\n  }\n\n  def validateDataset(dataset: String): Unit = {\n    if (datasetRegex.findFirstIn(dataset).isEmpty) {\n      throw ConfigFailure(\n        s\"Dataset '$dataset' does not match $datasetRegex.\"\n      )\n    }\n  }\n\n  def validateTypeName(typename: String): Unit = {\n    if (typeNameRegex.findFirstIn(typename).isEmpty) {\n      throw ConfigFailure(\n        s\"TypeName '$typename' does not match $typeNameRegex.\"\n      )","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/xai-org/x-algorithm/blob/24c60942c5c5fdad3a6addffb4c6e6d2f228f04f/botmaker/src/scala/com/twitter/botmaker/runtime/config/ServiceConfigs.scala#L71-L107","documentation":"Endpoint identifiers must match endpointRegex, with one special case: the literal endpoint \"ScribeClient\" is exempt. validateEndpoint throws ConfigFailure for any other endpoint string that does not match the regex.","triggerScenarios":"Registering an endpoint whose name fails endpointRegex and is not exactly \"ScribeClient\" — e.g. URLs, endpoints with slashes or colons, lowercase-with-dashes names.","commonSituations":"Confusing HTTP endpoint paths ('/api/v1/scan') with BotMaker endpoint identifiers; using scribe-style names without the ScribeClient exemption; mixed-case typos of ScribeClient like 'scribeClient' (case-sensitive — not exempt).","solutions":["Use a plain identifier matching endpointRegex instead of a URL/path","For scribe ingestion use exactly \"ScribeClient\" (case-sensitive)","Test endpoint names against endpointRegex in config unit tests"],"exampleFix":"// before\nendpoint(\"/v1/content-scan\")\n\n// after\nendpoint(\"ContentScan\")\n// or, for scribe consumption:\nendpoint(\"ScribeClient\")","handlingStrategy":"type-guard","validationCode":"ENDPOINT_RE = re.compile(r'^[A-Za-z][A-Za-z0-9_]*$')  # mirror endpointRegex\ndef validEndpoint(ep): return ep == \"ScribeClient\" or bool(ENDPOINT_RE.match(ep))","typeGuard":"def isValidEndpoint(ep: str) -> bool:\n    return ep == \"ScribeClient\" or bool(ENDPOINT_RE.match(ep))","tryCatchPattern":null,"preventionTips":["Never pass URL paths as endpoint identifiers","Remember the ScribeClient exemption is case-sensitive"],"tags":["botmaker","scala","naming-convention","endpoint","config-validation"],"backgroundTag":"identifier-validation-failed","analyzedSha":"24c60942c5c5fdad3a6addffb4c6e6d2f228f04f","analyzedAt":"2026-08-28T11:40:14.686Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}