{"record":{"id":"595bec9a116d219c","repo":"goharbor/harbor","slug":"not-found-595bec","errorCode":"NOT_FOUND","errorMessage":"garbage collection %d log is not found","messagePattern":"garbage collection (.+?) log is not found","errorType":"error_code","errorClass":"*errors.Error","httpStatus":404,"severity":"error","filePath":"src/server/v2.0/handler/gc.go","lineNumber":271,"sourceCode":"\t\tCreationTime: exec.StartTime,\n\t\tUpdateTime:   exec.UpdateTime,\n\t}\n\n\treturn operation.NewGetGCOK().WithPayload(res.ToSwagger())\n}\n\nfunc (g *gcAPI) GetGCLog(ctx context.Context, params operation.GetGCLogParams) middleware.Responder {\n\tif err := g.RequireSystemAccess(ctx, rbac.ActionRead, rbac.ResourceGarbageCollection); err != nil {\n\t\treturn g.SendError(ctx, err)\n\t}\n\ttasks, err := g.gcCtr.ListTasks(ctx, q.New(q.KeyWords{\n\t\t\"ExecutionID\": params.GCID,\n\t}))\n\tif err != nil {\n\t\treturn g.SendError(ctx, err)\n\t}\n\tif len(tasks) == 0 {\n\t\treturn g.SendError(ctx, errors.New(nil).WithCode(errors.NotFoundCode).WithMessagef(\"garbage collection %d log is not found\", params.GCID))\n\t}\n\tlog, err := g.gcCtr.GetTaskLog(ctx, tasks[0].ID)\n\tif err != nil {\n\t\treturn g.SendError(ctx, err)\n\t}\n\treturn operation.NewGetGCLogOK().WithPayload(string(log))\n}\n\nfunc (g *gcAPI) StopGC(ctx context.Context, params operation.StopGCParams) middleware.Responder {\n\tif err := g.RequireSystemAccess(ctx, rbac.ActionStop, rbac.ResourceGarbageCollection); err != nil {\n\t\treturn g.SendError(ctx, err)\n\t}\n\n\tif err := g.gcCtr.Stop(ctx, params.GCID); err != nil {\n\t\treturn g.SendError(ctx, err)\n\t}\n\n\treturn operation.NewStopGCOK()","sourceCodeStart":253,"sourceCodeEnd":289,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/server/v2.0/handler/gc.go#L253-L289","documentation":"Error \"garbage collection %d log is not found\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/server/v2.0/handler/gc.go:271 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"}