{"record":{"id":"e079460c010297f4","repo":"larksuite/cli","slug":"field-q-does-not-exist-e07946","errorCode":null,"errorMessage":"field %q does not exist","messagePattern":"field %q does not exist","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shortcuts/common/typed_compile_data.go","lineNumber":402,"sourceCode":"\t\t}\n\t\tswitch nested := field.Shape.(type) {\n\t\tcase typedObjectShape:\n\t\t\terr := mutateObjectField(&nested, parts[1:], mutate)\n\t\t\tfield.Shape = nested\n\t\t\treturn err\n\t\tcase typedOneOfShape:\n\t\t\tfor variantIndex, variant := range nested.Variants {\n\t\t\t\tif nestedObject, ok := variant.(typedObjectShape); ok {\n\t\t\t\t\terr := mutateObjectField(&nestedObject, parts[1:], mutate)\n\t\t\t\t\tnested.Variants[variantIndex] = nestedObject\n\t\t\t\t\tfield.Shape = nested\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn fmt.Errorf(\"segment %q traverses non-object shape\", name)\n\t}\n\treturn fmt.Errorf(\"field %q does not exist\", name)\n}\n\nfunc pointerFloats(values ...*float64) []float64 {\n\tresult := make([]float64, 0, len(values))\n\tfor _, value := range values {\n\t\tif value != nil {\n\t\t\tresult = append(result, *value)\n\t\t}\n\t}\n\treturn result\n}\n\nfunc shapeHasConstraints(shape typedValueShape) bool {\n\tswitch value := shape.(type) {\n\tcase typedStringShape:\n\t\treturn len(value.Enum) > 0 || value.Format != \"\" || value.MinLength != nil || value.MaxLength != nil\n\tcase typedBooleanShape:\n\t\treturn len(value.Enum) > 0","sourceCodeStart":384,"sourceCodeEnd":420,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/shortcuts/common/typed_compile_data.go#L384-L420","documentation":"mutateObjectField could not find a field matching the first (or next) segment of the override's JSON-pointer path in the compiled object shape, so it reports the field does not exist. The DataField override therefore references a field that the compiled data struct does not declare.","triggerScenarios":"CompileCommandDefinition with Output.Data.Overrides[i].Path whose segment (e.g. \"/statuz\" or \"/meta/renamedField\") does not match any Field name of the object shape at that level; also raised for nested segments when the parent object exists but lacks the child.","commonSituations":"Typo in the pointer path; case mismatch (matching is exact); the doc-declared struct field was renamed or removed while overrides still reference the old name; forgetting JSON-pointer escaping for keys containing '~' or '/'.","solutions":["Correct the Path to exactly match the field name declared on the Go data struct (names are case-sensitive).","Run the schema/dry-run output for the command to inspect the compiled data shape and copy the exact field names.","Remove the override if the field no longer exists after a model change.","Check nested paths: each segment must exist at its own level (parent object first)."],"exampleFix":"// before\ncommon.TypedDataField{Path: \"/desc\", Description: \"...\"} // field is \"description\"\n// after\ncommon.TypedDataField{Path: \"/description\", Description: \"...\"}","handlingStrategy":"validation","validationCode":"func validateOverridePaths(paths []string, root map[string]common.TypedValueField) error {\n  for _, path := range paths {\n    parts := strings.Split(strings.TrimPrefix(path, \"/\"), \"/\")\n    cur := root\n    for i, p := range parts {\n      f, ok := cur[p]\n      if !ok { return fmt.Errorf(\"override %q: %q does not exist\", path, p) }\n      if i < len(parts)-1 {\n        if obj, ok := f.Shape.(common.TypedObjectShape); ok { cur = fieldMap(obj) } else { break }\n      }\n    }\n  }\n  return nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy field names from the compiled schema output instead of typing them.","Watch for renames/removals of struct fields; search the codebase for override paths referencing them.","Escape '~' as '~0' and '/' as '~1' in pointer segments per RFC 6901."],"tags":["json-pointer","schema","compile-time"],"backgroundTag":"unknown-field-reference","analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}