larksuite/cli · error
Output.Data.Overrides[%d] path %q: %w
Error message
Output.Data.Overrides[%d] path %q: %w
What it means
Wraps failures while applying one Output.Data.Overrides entry: the JSON-pointer path is empty/malformed or the targeted field mutation failed. Index and path identify the offending override.
Source
Thrown at shortcuts/common/typed_compile_data.go:55
if dataType.Kind() == reflect.Interface && dataType.NumMethod() == 0 {
if len(definition.Overrides) > 0 {
return nil, fmt.Errorf("Output.Data.Overrides require struct Data")
}
return anyJSONShape{}, nil
}
if dataType.Kind() != reflect.Struct {
return nil, fmt.Errorf("Data must be a non-pointer struct or any unless Output.Data.Shape is explicit, got %s", dataType)
}
shape, err := compileStructShape(dataType, false, "Data", map[reflect.Type]struct{}{})
if err != nil {
return nil, err
}
for i, override := range definition.Overrides {
if override.Path == "" || !strings.HasPrefix(override.Path, "/") {
return nil, fmt.Errorf("Output.Data.Overrides[%d].Path %q must be an RFC 6901 JSON Pointer", i, override.Path)
}
if err := applyDataOverride(&shape, override); err != nil {
return nil, fmt.Errorf("Output.Data.Overrides[%d] path %q: %w", i, override.Path, err)
}
}
if err := validateShape(shape, "Output.Data"); err != nil {
return nil, err
}
return shape, nil
}
// shapeForType derives the ValueShape of one Go type. active carries the struct
// types on the current recursion path so a self-referential type is rejected
// with a compile error; see compileStructShape.
func shapeForType(t reflect.Type, schema schemaTag, input bool, active map[reflect.Type]struct{}) (typedValueShape, error) {
baseType := t
for baseType.Kind() == reflect.Pointer {
baseType = baseType.Elem()
}
var shape typedValueShape
switch baseType.Kind() {View on GitHub (pinned to 7fd6ef3c07)
Solutions
- Fix the JSON Pointer path in the failing Output.Data.Overrides entry (RFC 6901, fields must exist)
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at shortcuts/common/typed_compile_data.go:55 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/a774b2ee015ff233.
Report an issue: GitHub.