{"record":{"id":"676fbbc022c1a324","repo":"goharbor/harbor","slug":"denied-676fbb","errorCode":"DENIED","errorMessage":"the operation isn't supported for an artifact accessory","messagePattern":"the operation isn't supported for an artifact accessory","errorType":"error_code","errorClass":"*errors.Error","httpStatus":403,"severity":"error","filePath":"src/server/v2.0/handler/artifact.go","lineNumber":193,"sourceCode":"\tif err != nil {\n\t\treturn a.SendError(ctx, err)\n\t}\n\n\tsrcPro, _ := utils.ParseRepository(srcRepo)\n\tif err = a.RequireProjectAccess(ctx, srcPro, rbac.ActionRead, rbac.ResourceArtifact); err != nil {\n\t\treturn a.SendError(ctx, err)\n\t}\n\n\tsrcArt, err := a.artCtl.GetByReference(ctx, srcRepo, ref, nil)\n\tif err != nil {\n\t\treturn a.SendError(ctx, err)\n\t}\n\taccs, err := a.accMgr.List(ctx, q.New(q.KeyWords{\"ArtifactID\": srcArt.ID, \"Digest\": srcArt.Digest}))\n\tif err != nil {\n\t\treturn a.SendError(ctx, err)\n\t}\n\tif len(accs) >= 1 && accs[0].IsHard() {\n\t\treturn a.SendError(ctx, errors.New(nil).WithCode(errors.DENIED).WithMessage(\"the operation isn't supported for an artifact accessory\"))\n\t}\n\n\tdstRepo := fmt.Sprintf(\"%s/%s\", params.ProjectName, params.RepositoryName)\n\t_, _, err = a.repoCtl.Ensure(ctx, dstRepo)\n\tif err != nil {\n\t\treturn a.SendError(ctx, err)\n\t}\n\n\t_, err = a.artCtl.Copy(ctx, srcRepo, ref, dstRepo)\n\tif err != nil {\n\t\treturn a.SendError(ctx, err)\n\t}\n\tlocation := strings.TrimSuffix(params.HTTPRequest.URL.Path, \"/\") + \"/\" + ref\n\treturn operation.NewCopyArtifactCreated().WithLocation(location)\n}\n\n// parse \"repository:tag\" or \"repository@digest\" into repository and reference parts\nfunc parse(s string) (string, string, error) {","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/server/v2.0/handler/artifact.go#L175-L211","documentation":"Error \"the operation isn't supported for an artifact accessory\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/server/v2.0/handler/artifact.go:193 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"}