{"record":{"id":"7f60d4ac521d27b0","repo":"goharbor/harbor","slug":"missing-required-headers","errorCode":null,"errorMessage":"missing required headers","messagePattern":"missing required headers","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/p2p/preheat/provider/preheat_image.go","lineNumber":91,"sourceCode":"\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"encode preheating image error: %w\", err)\n\t}\n\n\treturn string(data), nil\n}\n\n// Validate PreheatImage\nfunc (img *PreheatImage) Validate() error {\n\tif !slices.Contains(SupportedTypes, img.Type) {\n\t\treturn fmt.Errorf(\"unsupported type '%s'\", img.Type)\n\t}\n\n\tif len(img.ImageName) == 0 || len(img.Tag) == 0 {\n\t\treturn errors.New(\"missing image repository or tag\")\n\t}\n\n\tif len(img.Headers) == 0 {\n\t\treturn errors.New(\"missing required headers\")\n\t}\n\n\t_, err := url.Parse(img.URL)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"malformed registry URL: %w\", err)\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":73,"sourceCodeEnd":101,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/p2p/preheat/provider/preheat_image.go#L73-L101","documentation":"Error \"missing required headers\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/p2p/preheat/provider/preheat_image.go:91 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":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}