{"record":{"id":"65dfc7b9226eccd0","repo":"goharbor/harbor","slug":"project-v-not-found","errorCode":null,"errorMessage":"project %v not found","messagePattern":"project (.+?) not found","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"src/core/api/base.go","lineNumber":121,"sourceCode":"\t\t} else {\n\t\t\tb.SendError(err)\n\t\t}\n\t\treturn false\n\t}\n\n\tif !hasPermission {\n\t\tb.SendPermissionError()\n\t\treturn false\n\t}\n\n\treturn true\n}\n\n// This should be called when a project is not found, if the caller is a system admin it returns 404.\n// If it's regular user, it will render permission error\nfunc (b *BaseController) handleProjectNotFound(projectIDOrName any) {\n\tif b.SecurityCtx.IsSysAdmin() {\n\t\tb.SendNotFoundError(fmt.Errorf(\"project %v not found\", projectIDOrName))\n\t} else {\n\t\tb.SendPermissionError()\n\t}\n}\n\n// SendPermissionError is a shortcut for sending different http error based on authentication status.\nfunc (b *BaseController) SendPermissionError() {\n\tif !b.SecurityCtx.IsAuthenticated() {\n\t\tb.SendUnAuthorizedError(errors.New(\"UnAuthorized\"))\n\t} else {\n\t\tb.SendForbiddenError(errors.New(b.SecurityCtx.GetUsername()))\n\t}\n}\n\n// WriteJSONData writes the JSON data to the client.\nfunc (b *BaseController) WriteJSONData(object any) {\n\tb.Data[\"json\"] = object\n\tif err := b.ServeJSON(); err != nil {","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/core/api/base.go#L103-L139","documentation":"Error \"project %v not found\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/core/api/base.go:121 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"}