{"record":{"id":"61c17f54925f5a53","repo":"xai-org/x-algorithm","slug":"unrecognized-function-name","errorCode":null,"errorMessage":"unrecognized function name: ","messagePattern":"unrecognized function name: ","errorType":"validation","errorClass":"SemanticCheckFailure","httpStatus":null,"severity":"error","filePath":"botmaker/src/java/com/twitter/botmaker/compiler/Compiler.java","lineNumber":629,"sourceCode":"      }\n      return result;\n    }\n\n    if (context.containsFunction(funcName)) {\n      childASTNodes = getChildrenASTNodesSkippingFirst(context, root);\n      try {\n        result = context.createFunctionASTNode(funcName, childASTNodes);\n      } catch (Exception functionException) {\n        try {\n          result = toDerivedFeatureFunction(context, funcName, root.getLine(), childASTNodes);\n        } catch (Exception dfException) {\n          throw functionException;\n        }\n      }\n      return result;\n    }\n\n    throw new SemanticCheckFailure(\"unrecognized function name: \" + funcName);\n  }\n\n  private ASTNode toDoOperations(\n      CompilerContext context,\n      String exprText, ImmutableList<ASTNode> children,\n      BuiltinFunctions funcNameEnum) throws SemanticCheckFailure {\n    switch (funcNameEnum) {\n      case Do:\n        return new Do(exprText, children);\n      case DoAsync:\n        return new DoAsync(exprText, children);\n      case DoSequential:\n        return new DoSequential(exprText, children);\n      default:\n        throw new SemanticCheckFailure(\n            \"programming error: unknown Do* operation \" + funcNameEnum);\n    }\n  }","sourceCodeStart":611,"sourceCodeEnd":647,"githubUrl":"https://github.com/xai-org/x-algorithm/blob/24c60942c5c5fdad3a6addffb4c6e6d2f228f04f/botmaker/src/java/com/twitter/botmaker/compiler/Compiler.java#L611-L647","documentation":"Botmaker's DSL compiler encountered a function name it cannot resolve. After trying builtins, derived features, and mock definitions, botmakerFunctionToASTNode has no handler for the given function token, so the expression fails semantic checking at compile time.","triggerScenarios":"Calling an undefined or misspelled function in a Botmaker rule/feature expression, e.g. `MyFunc(x)` where MyFunc is neither a BuiltinFunctions entry nor a registered derived feature; also happens after renaming/removing a derived feature while stale expressions still reference it.","commonSituations":"Typos in function names, using a function from a newer/older Botmaker version, referencing a derived feature defined in another compilation unit, or forgetting to declare/import the function before use.","solutions":["Check the exact spelling and case of the function name in the expression","Verify the function is a supported builtin or a defined DerivedFeature in the same compilation context","If the function lives elsewhere, define/import it before use","Consult the builtin function enum (BuiltinFunctions) for available names"],"exampleFix":"// before\nScore = compuetScore(features)\n// after\nScore = computeScore(features)","handlingStrategy":"validation","validationCode":"Set<String> known = builtinNames(); known.addAll(declaredDerivedFeatures);\nif (!known.contains(funcName)) throw new IllegalArgumentException(\"Unknown function: \" + funcName);","typeGuard":null,"tryCatchPattern":"catch (SemanticCheckFailure e) { if (e.getMessage().startsWith(\"unrecognized function name\")) reportUnknownFunction(e); else throw e; }","preventionTips":["Maintain a whitelist of allowed functions and validate expressions before compiling","Lint rule expressions in CI before deployment"],"tags":["botmaker","compiler","unknown-function","semantic-check"],"backgroundTag":"unknown-function-reference","analyzedSha":"24c60942c5c5fdad3a6addffb4c6e6d2f228f04f","analyzedAt":"2026-08-28T11:40:14.686Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}