{"record":{"id":"34618cf56813e6cb","repo":"goharbor/harbor","slug":"not-found-34618c","errorCode":"NOT_FOUND","errorMessage":"label %d not found","messagePattern":"label (.+?) not found","errorType":"error_code","errorClass":"*errors.Error","httpStatus":404,"severity":"error","filePath":"src/server/v2.0/handler/label.go","lineNumber":81,"sourceCode":"\t\treturn lAPI.SendError(ctx, err)\n\t}\n\n\tid, err := lAPI.labelMgr.Create(ctx, label)\n\tif err != nil {\n\t\treturn lAPI.SendError(ctx, err)\n\t}\n\n\tlocation := fmt.Sprintf(\"%s/%d\", strings.TrimSuffix(params.HTTPRequest.URL.Path, \"/\"), id)\n\treturn operation.NewCreateLabelCreated().WithLocation(location)\n}\n\nfunc (lAPI *labelAPI) GetLabelByID(ctx context.Context, params operation.GetLabelByIDParams) middleware.Responder {\n\tlabel, err := lAPI.labelMgr.Get(ctx, params.LabelID)\n\tif err != nil {\n\t\treturn lAPI.SendError(ctx, err)\n\t}\n\tif label == nil || label.Deleted {\n\t\treturn lAPI.SendError(ctx, errors.New(nil).WithMessagef(\"label %d not found\", params.LabelID).WithCode(errors.NotFoundCode))\n\t}\n\n\tif err := lAPI.requireAccess(ctx, label, rbac.ActionRead); err != nil {\n\t\treturn lAPI.SendError(ctx, err)\n\t}\n\n\treturn operation.NewGetLabelByIDOK().WithPayload(model.NewLabel(label).ToSwagger())\n}\n\nfunc (lAPI *labelAPI) ListLabels(ctx context.Context, params operation.ListLabelsParams) middleware.Responder {\n\tquery, err := lAPI.BuildQuery(ctx, params.Q, params.Sort, params.Page, params.PageSize)\n\tif err != nil {\n\t\treturn lAPI.SendError(ctx, err)\n\t}\n\n\tscope := lib.StringValue(params.Scope)\n\tif scope != common.LabelScopeGlobal && scope != common.LabelScopeProject {\n\t\treturn lAPI.SendError(ctx, errors.New(nil).WithMessagef(\"invalid scope: %s\", scope).WithCode(errors.BadRequestCode))","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/server/v2.0/handler/label.go#L63-L99","documentation":"Error \"label %d not found\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/server/v2.0/handler/label.go:81 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"}