xai-org/x-algorithm · error · SemanticCheckFailure
Unsupported field type %s
Error message
Unsupported field type %s
What it means
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.
Source
Thrown at botmaker/src/java/com/twitter/botmaker/compiler/thrift/PrimitiveValueMetaData.java:55
break;
case TType.I32:
type = Type.LONG;
rawType = Type.INTEGER;
break;
case TType.I64:
type = Type.LONG;
rawType = Type.LONG;
break;
case TType.DOUBLE:
type = Type.DOUBLE;
rawType = Type.DOUBLE;
break;
default:
throw new SemanticCheckFailure(
String.format("Unsupported field type %s", ttype));
}
}
@Override
public Type getType() {
return type;
}
@Override
public Type getRawType() {
return rawType;
}
}
View on GitHub (pinned to 24c60942c5)
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
Example fix
// before field: myOddField // thrift type not supported by botmaker // after field: supportedField // use a field whose thrift TType is a supported primitive
Defensive patterns
Strategy: validation
Validate before calling
byte t = fieldValueMetaData.type;
boolean ok = t == TType.BOOL || t == TType.BYTE || t == TType.DOUBLE
|| t == TType.I16 || t == TType.I32 || t == TType.I64 || t == TType.STRING;
if (!ok) skipField(); Try / catch
catch (SemanticCheckFailure e) when message starts with 'Unsupported field type' -> log and skip the field, continue compiling remaining fields
Prevention
- Pin thrift schema versions used by botmaker rules
- Add CI checks that all referenced fields have supported TTypes
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Unsupported field type %s
- Unsupported field type %s
- field %s not found in the metadata of thrift class %s
- field %s not found in the metadata of thrift class %s
- class has to be either a TBase or ThriftStruct: %s.
AI-assisted analysis of xai-org/x-algorithm@24c60942c5 (2026-08-28).
Data as JSON: /api/errors/a455a9b49dc45bf2.
Report an issue: GitHub.