{"record":{"id":"d5d38a16a3ded940","repo":"goharbor/harbor","slug":"unsupported-candidate-kind-s","errorCode":null,"errorMessage":"unsupported candidate kind: %s","messagePattern":"unsupported candidate kind: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/retention/dep/client.go","lineNumber":208,"sourceCode":"\tdefault:\n\t\treturn fmt.Errorf(\"unsupported repository kind: %s\", repo.Kind)\n\t}\n}\n\n// Deletes the specified candidate\nfunc (bc *basicClient) Delete(candidate *selector.Candidate) error {\n\tif candidate == nil {\n\t\treturn errors.New(\"candidate is nil\")\n\t}\n\tswitch candidate.Kind {\n\tcase selector.Image:\n\t\treturn bc.coreClient.DeleteArtifact(candidate.Namespace, candidate.Repository, candidate.Digest)\n\t/*\n\t\tcase art.Chart:\n\t\t\treturn bc.coreClient.DeleteChart(candidate.Namespace, candidate.Repository, candidate.Tag)\n\t*/\n\tdefault:\n\t\treturn fmt.Errorf(\"unsupported candidate kind: %s\", candidate.Kind)\n\t}\n}\n","sourceCodeStart":190,"sourceCodeEnd":211,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/retention/dep/client.go#L190-L211","documentation":"Returned by Delete when candidate.Kind is not 'image' (chart deletion is commented out). This is a default-branch guard in the kind switch: the retention deletion path only knows how to delete image artifacts via DeleteArtifact, so any other candidate kind is rejected before attempting deletion.","triggerScenarios":"Thrown at src/pkg/retention/dep/client.go:208 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure retention deletion is only invoked for image candidates","Extend the switch to handle additional kinds if needed","Filter candidates by kind before scheduling deletion"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","contentChangedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}