{"record":{"id":"8b35ec3f91704970","repo":"goharbor/harbor","slug":"not-found-8b35ec","errorCode":"NOT_FOUND","errorMessage":"project id:%d, webhook policy id: %d not found","messagePattern":"project id:(.+?), webhook policy id: (.+?) not found","errorType":"http","errorClass":"NotFoundError","httpStatus":404,"severity":"error","filePath":"src/server/v2.0/handler/webhook.go","lineNumber":72,"sourceCode":"}\n\nfunc (n *webhookAPI) Prepare(_ context.Context, _ string, _ any) middleware.Responder {\n\treturn nil\n}\n\nfunc (n *webhookAPI) requirePolicyInProject(ctx context.Context, projectIDOrName any, policyID int64) error {\n\tprojectID, err := getProjectID(ctx, projectIDOrName)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tl, err := n.webhookCtl.GetPolicy(ctx, policyID)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif projectID != l.ProjectID {\n\t\treturn errors.NotFoundError(fmt.Errorf(\"project id:%d, webhook policy id: %d not found\", projectID, policyID))\n\t}\n\treturn nil\n}\n\nfunc (n *webhookAPI) requireExecutionInPolicy(ctx context.Context, execID, policyID int64) error {\n\texec, err := n.execCtl.Get(ctx, execID)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif exec.VendorID == policyID && (exec.VendorType == job.WebhookJobVendorType || exec.VendorType == job.SlackJobVendorType) {\n\t\treturn nil\n\t}\n\n\treturn errors.NotFoundError(fmt.Errorf(\"execution %d not found in policy %d\", execID, policyID))\n}\n\nfunc (n *webhookAPI) requireTaskInExecution(ctx context.Context, taskID, execID int64) error {","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/server/v2.0/handler/webhook.go#L54-L90","documentation":"Error \"project id:%d, webhook policy id: %d not found\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/server/v2.0/handler/webhook.go:72 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"}