{"record":{"id":"b1b6e22aa61f1369","repo":"goharbor/harbor","slug":"not-found-b1b6e2","errorCode":"NOT_FOUND","errorMessage":"tag %s attached to artifact %d not found","messagePattern":"tag (.+?) attached to artifact (.+?) not found","errorType":"error_code","errorClass":"*errors.Error","httpStatus":404,"severity":"error","filePath":"src/server/v2.0/handler/artifact.go","lineNumber":301,"sourceCode":"\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\n\tfor _, tag := range artifact.Tags {\n\t\tif tag.Name == params.TagName {\n\t\t\tid = tag.ID\n\t\t\tbreak\n\t\t}\n\t}\n\t// the tag not found\n\tif id == 0 {\n\t\terr = errors.New(nil).WithCode(errors.NotFoundCode).WithMessagef(\n\t\t\t\"tag %s attached to artifact %d not found\", params.TagName, artifact.ID)\n\t\treturn a.SendError(ctx, err)\n\t}\n\tif err = a.tagCtl.Delete(ctx, id); err != nil {\n\t\treturn a.SendError(ctx, err)\n\t}\n\n\t// fire event\n\tnotification.AddEvent(ctx, &metadata.DeleteTagEventMetadata{\n\t\tCtx:              ctx,\n\t\tTag:              params.TagName,\n\t\tLabels:           artifact.AbstractLabelNames(),\n\t\tAttachedArtifact: &artifact.Artifact,\n\t})\n\n\treturn operation.NewDeleteTagOK()\n}\n","sourceCodeStart":283,"sourceCodeEnd":319,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/server/v2.0/handler/artifact.go#L283-L319","documentation":"Error \"tag %s attached to artifact %d not found\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/server/v2.0/handler/artifact.go:301 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"}