{"record":{"id":"f6a1e0c3cc6e73c1","repo":"goharbor/harbor","slug":"purge-job-with-id-d-not-found","errorCode":null,"errorMessage":"purge job with id %d not found","messagePattern":"purge job with id (.+?) not found","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"src/server/v2.0/handler/purge.go","lineNumber":212,"sourceCode":"\t}\n\n\treturn purge.NewGetPurgeHistoryOK().\n\t\tWithXTotalCount(total).\n\t\tWithLink(p.Links(ctx, params.HTTPRequest.URL, total, query.PageNumber, query.PageSize).String()).\n\t\tWithPayload(results)\n}\n\nfunc (p *purgeAPI) GetPurgeJob(ctx context.Context, params purge.GetPurgeJobParams) middleware.Responder {\n\tif err := p.RequireSystemAccess(ctx, rbac.ActionRead, rbac.ResourcePurgeAuditLog); err != nil {\n\t\treturn p.SendError(ctx, err)\n\t}\n\n\texec, err := p.executionCtl.Get(ctx, params.PurgeID)\n\tif err != nil {\n\t\treturn p.SendError(ctx, err)\n\t}\n\tif exec.VendorType != job.PurgeAuditVendorType {\n\t\treturn p.SendError(ctx, fmt.Errorf(\"purge job with id %d not found\", params.PurgeID))\n\t}\n\n\textraAttrsString, err := json.Marshal(exec.ExtraAttrs)\n\tif err != nil {\n\t\treturn p.SendError(ctx, err)\n\t}\n\n\tres := &model.ExecHistory{\n\t\tID:         exec.ID,\n\t\tName:       job.PurgeAuditVendorType,\n\t\tKind:       exec.Trigger,\n\t\tParameters: string(extraAttrsString),\n\t\tStatus:     exec.Status,\n\t\tSchedule: &model.ScheduleParam{\n\t\t\tType: exec.Trigger,\n\t\t},\n\t\tCreationTime: exec.StartTime,\n\t\tUpdateTime:   exec.UpdateTime,","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/server/v2.0/handler/purge.go#L194-L230","documentation":"Vendor-type guard in GetPurgeJob: the execution referenced by purge_id either does not exist or, when it exists, its VendorType is not the purge-audit-log vendor — meaning the ID points at an execution of some other kind (e.g. replication or retention), which cannot be returned as a purge job and is reported as not found.","triggerScenarios":"Thrown at src/server/v2.0/handler/purge.go:212 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an execution ID obtained from the purge audit log history endpoint","Confirm the ID is not an execution of another vendor type (replication, scan, retention)","List purge executions first and pick the correct purge_id"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","contentChangedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}