{"record":{"id":"1a6a058c7071fb66","repo":"goharbor/harbor","slug":"precondition-1a6a05","errorCode":"PRECONDITION","errorMessage":"the same name but different digest artifact exists, but the override is set to false","messagePattern":"the same name but different digest artifact exists, but the override is set to false","errorType":"error_code","errorClass":"lib/errors.Error","httpStatus":412,"severity":"error","filePath":"src/pkg/registry/client.go","lineNumber":585,"sourceCode":"\t// pull the manifest from the source repository\n\tmanifest, srcDgt, err := c.PullManifest(srcRepo, srcRef)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// check the existence of the artifact on the destination repository\n\texist, desc, err := c.ManifestExist(dstRepo, dstRef)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif exist {\n\t\t// the same artifact already exists\n\t\tif desc != nil && srcDgt == string(desc.Digest) {\n\t\t\treturn nil\n\t\t}\n\t\t// the same name artifact exists, but not allowed to override\n\t\tif !override {\n\t\t\treturn errors.New(nil).WithCode(errors.PreconditionCode).\n\t\t\t\tWithMessage(\"the same name but different digest artifact exists, but the override is set to false\")\n\t\t}\n\t}\n\n\tfor _, descriptor := range manifest.References() {\n\t\tdigest := descriptor.Digest.String()\n\t\tswitch descriptor.MediaType {\n\t\t// skip foreign layer\n\t\tcase schema2.MediaTypeForeignLayer:\n\t\t\tcontinue\n\t\t// manifest or index\n\t\tcase v1.MediaTypeImageIndex, manifestlist.MediaTypeManifestList,\n\t\t\tv1.MediaTypeImageManifest, schema2.MediaTypeManifest,\n\t\t\tschema1.MediaTypeSignedManifest, schema1.MediaTypeManifest:\n\t\t\tif err = c.Copy(srcRepo, digest, dstRepo, digest, false); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t// common layer","sourceCodeStart":567,"sourceCodeEnd":603,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/registry/client.go#L567-L603","documentation":"Error \"the same name but different digest artifact exists, but the override is set to false\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/registry/client.go:585 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"}