larksuite/cli · error
%s uses unknown ValueShape %T
Error message
%s uses unknown ValueShape %T
What it means
validateShape's default branch: the shape value's concrete Go type is not one of the known typed*Shape implementations - an authoring-time programming error, or a new shape kind not taught to the validator.
Source
Thrown at shortcuts/common/typed_compile_data.go:333
}
}
if value.AdditionalPropertiesShape != nil && !value.AdditionalProperties {
return fmt.Errorf("%s AdditionalPropertiesShape requires AdditionalProperties", path)
}
if value.AdditionalPropertiesShape != nil {
return validateShape(value.AdditionalPropertiesShape, path+".AdditionalPropertiesShape")
}
case typedOneOfShape:
if len(value.Variants) < 2 {
return fmt.Errorf("%s oneOf requires at least two variants", path)
}
for i, variant := range value.Variants {
if err := validateShape(variant, fmt.Sprintf("%s.Variants[%d]", path, i)); err != nil {
return err
}
}
default:
return fmt.Errorf("%s uses unknown ValueShape %T", path, shape)
}
return nil
}
func applyDataOverride(root *typedObjectShape, override typedDataField) error {
encodedParts := strings.Split(strings.TrimPrefix(override.Path, "/"), "/")
if len(encodedParts) == 0 || encodedParts[0] == "" {
return fmt.Errorf("pointer must identify a field")
}
parts := make([]string, len(encodedParts))
for i, encoded := range encodedParts {
decoded, ok := decodeJSONPointerSegment(encoded)
if !ok {
return fmt.Errorf("segment %q has invalid RFC 6901 escaping", encoded)
}
parts[i] = decoded
}
return mutateObjectField(root, parts, func(field *typedValueField) error {View on GitHub (pinned to 7fd6ef3c07)
Solutions
- Pass one of the typed*Shape implementations, or extend validateShape for the new kind
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at shortcuts/common/typed_compile_data.go:333 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of larksuite/cli@7fd6ef3c07 (2026-09-04).
Data as JSON: /api/errors/956b955a4153e062.
Report an issue: GitHub.