{"record":{"id":"eb6b2c73af2b15a2","repo":"goharbor/harbor","slug":"method-not-allowed","errorCode":"METHOD_NOT_ALLOWED","errorMessage":"the operation isn't supported for a proxy cache project","messagePattern":"the operation isn't supported for a proxy cache project","errorType":"error_code","errorClass":"*errors.Error","httpStatus":405,"severity":"error","filePath":"src/server/v2.0/handler/artifact.go","lineNumber":274,"sourceCode":"\t// fire event\n\tnotification.AddEvent(ctx, &metadata.CreateTagEventMetadata{\n\t\tCtx:              ctx,\n\t\tTag:              tag.Name,\n\t\tLabels:           art.AbstractLabelNames(),\n\t\tAttachedArtifact: &art.Artifact,\n\t})\n\n\t// as we provide no API for get the single tag, ignore setting the location header here\n\treturn operation.NewCreateTagCreated()\n}\n\nfunc (a *artifactAPI) requireNonProxyCacheProject(ctx context.Context, name string) error {\n\tpro, err := a.proCtl.GetByName(ctx, name)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif pro.IsProxy() {\n\t\treturn errors.New(nil).WithCode(errors.MethodNotAllowedCode).\n\t\t\tWithMessagef(\"the operation isn't supported for a proxy cache project\")\n\t}\n\treturn nil\n}\n\nfunc (a *artifactAPI) DeleteTag(ctx context.Context, params operation.DeleteTagParams) middleware.Responder {\n\tif err := a.RequireProjectAccess(ctx, params.ProjectName, rbac.ActionDelete, rbac.ResourceTag); err != nil {\n\t\treturn a.SendError(ctx, err)\n\t}\n\tartifact, err := a.artCtl.GetByReference(ctx, fmt.Sprintf(\"%s/%s\", params.ProjectName, params.RepositoryName),\n\t\tparams.Reference, &artifact.Option{\n\t\t\tWithTag:   true,\n\t\t\tWithLabel: true,\n\t\t})\n\tif err != nil {\n\t\treturn a.SendError(ctx, err)\n\t}\n\tvar id int64","sourceCodeStart":256,"sourceCodeEnd":292,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/server/v2.0/handler/artifact.go#L256-L292","documentation":"Error \"the operation isn't supported for a proxy cache project\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/server/v2.0/handler/artifact.go:274 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"}