{"record":{"id":"a455a9b49dc45bf2","repo":"xai-org/x-algorithm","slug":"unsupported-field-type-s","errorCode":null,"errorMessage":"Unsupported field type %s","messagePattern":"Unsupported field type (.+?)","errorType":"exception","errorClass":"SemanticCheckFailure","httpStatus":null,"severity":"error","filePath":"botmaker/src/java/com/twitter/botmaker/compiler/thrift/PrimitiveValueMetaData.java","lineNumber":55,"sourceCode":"        break;\n\n      case TType.I32:\n        type = Type.LONG;\n        rawType = Type.INTEGER;\n        break;\n\n      case TType.I64:\n        type = Type.LONG;\n        rawType = Type.LONG;\n        break;\n\n      case TType.DOUBLE:\n        type = Type.DOUBLE;\n        rawType = Type.DOUBLE;\n        break;\n\n      default:\n        throw new SemanticCheckFailure(\n            String.format(\"Unsupported field type %s\", ttype));\n    }\n  }\n\n  @Override\n  public Type getType() {\n    return type;\n  }\n\n  @Override\n  public Type getRawType() {\n    return rawType;\n  }\n}\n\n","sourceCodeStart":37,"sourceCodeEnd":71,"githubUrl":"https://github.com/xai-org/x-algorithm/blob/24c60942c5c5fdad3a6addffb4c6e6d2f228f04f/botmaker/src/java/com/twitter/botmaker/compiler/thrift/PrimitiveValueMetaData.java#L37-L71","documentation":"PrimitiveValueMetaData maps a thrift TType code to an internal Type. When the compiled query references a field whose thrift TType is not one of the supported primitives (bool, byte, double, i16/i32/i64, string, etc.), the switch falls through to default and throws SemanticCheckFailure.","triggerScenarios":"Calling PrimitiveValueMetaData's constructor with a byte ttype value outside the supported TType set (e.g. TType.STOP, TType.VOID, TType.UTF16, or an unknown/negative code), typically while introspecting thrift FieldValueMetaData for a field used in a botmaker rule.","commonSituations":"Upgrading a thrift schema that introduces a new/unsupported field type (e.g. binary/uuid anomalies), referencing a newly added thrift field type in a botmaker query, or a thrift runtime version change altering TType constants.","solutions":["Remove or stop referencing the field with the unsupported type in the botmaker rule","Check which TType code is reported and verify it against the supported set in PrimitiveValueMetaData","Regenerate the thrift classes so field metadata matches the runtime's TType constants","Upgrade botmaker to a version supporting the new thrift type"],"exampleFix":"// before\nfield: myOddField   // thrift type not supported by botmaker\n// after\nfield: supportedField  // use a field whose thrift TType is a supported primitive","handlingStrategy":"validation","validationCode":"byte t = fieldValueMetaData.type;\nboolean ok = t == TType.BOOL || t == TType.BYTE || t == TType.DOUBLE\n    || t == TType.I16 || t == TType.I32 || t == TType.I64 || t == TType.STRING;\nif (!ok) skipField();","typeGuard":null,"tryCatchPattern":"catch (SemanticCheckFailure e) when message starts with 'Unsupported field type' -> log and skip the field, continue compiling remaining fields","preventionTips":["Pin thrift schema versions used by botmaker rules","Add CI checks that all referenced fields have supported TTypes"],"tags":["thrift","type-system","schema-validation"],"backgroundTag":"unsupported-thrift-field-type","analyzedSha":"24c60942c5c5fdad3a6addffb4c6e6d2f228f04f","analyzedAt":"2026-08-28T11:40:14.686Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}