{"record":{"id":"8b15d2d08e6f7b69","repo":"kubernetes/kops","slug":"error-executing-template-q-v","errorCode":null,"errorMessage":"error executing template %q: %v","messagePattern":"error executing template %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/resources/template_resource.go","lineNumber":65,"sourceCode":"\tt.Funcs(functions)\n\t_, err := t.Parse(definition)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error parsing template %q: %v\", key, err)\n\t}\n\n\tt.Option(\"missingkey=zero\")\n\n\tr.parsed = t\n\n\treturn r, nil\n}\n\nfunc (r *templateResource) Open() (io.Reader, error) {\n\tbuffer := &bytes.Buffer{}\n\n\terr := r.parsed.ExecuteTemplate(buffer, r.key, r.context)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error executing template %q: %v\", r.key, err)\n\t}\n\n\treturn buffer, nil\n}\n","sourceCodeStart":47,"sourceCodeEnd":70,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/resources/template_resource.go#L47-L70","documentation":"A previously parsed template failed at execution/rendering time in templateResource.Open(). Parse-time syntax was fine, but evaluating the template against its context raised an error (e.g. calling a func that errors, or invalid value operations). The key in the message identifies which template failed.","triggerScenarios":"Thrown at pkg/model/resources/template_resource.go:65 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped execution error for the failing field/function","Fix the data passed in the template context or the template's logic accordingly"],"exampleFix":null,"handlingStrategy":"try-catch","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"}