{"record":{"id":"c732a696b5922354","repo":"kubernetes/kops","slug":"field-cannot-be-changed-s","errorCode":null,"errorMessage":"Field cannot be changed: %s","messagePattern":"Field cannot be changed: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/errors.go","lineNumber":33,"sourceCode":"*/\n\npackage fi\n\nimport (\n\t\"fmt\"\n\n\t\"k8s.io/apimachinery/pkg/api/validation\"\n\t\"k8s.io/apimachinery/pkg/util/validation/field\"\n\n\t\"k8s.io/kops/util/pkg/reflectutils\"\n)\n\nfunc RequiredField(key string) error {\n\treturn fmt.Errorf(\"Field is required: %s\", key)\n}\n\nfunc CannotChangeField(key string) error {\n\treturn fmt.Errorf(\"Field cannot be changed: %s\", key)\n}\n\nfunc FieldIsImmutable(newVal, oldVal interface{}, fldPath *field.Path) *field.Error {\n\tdetails := fmt.Sprintf(\"%s: old=%v new=%v\", validation.FieldImmutableErrorMsg, reflectutils.FormatValue(oldVal), reflectutils.FormatValue(newVal))\n\treturn field.Forbidden(fldPath, details)\n}\n","sourceCodeStart":15,"sourceCodeEnd":40,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/errors.go#L15-L40","documentation":"Error \"Field cannot be changed: %s\" thrown in kubernetes/kops.","triggerScenarios":"Thrown at upup/pkg/fi/errors.go:33 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}