{"record":{"id":"85751395fda84274","repo":"theonedev/onedev","slug":"project-not-found-or-inaccessible-projectpath","errorCode":null,"errorMessage":"Project not found or inaccessible: ${projectPath}","messagePattern":"Project not found or inaccessible: (.+?)","errorType":"exception","errorClass":"NotFoundException","httpStatus":404,"severity":"error","filePath":"server-core/src/main/java/io/onedev/server/ai/TodResource.java","lineNumber":217,"sourceCode":"    private Validator validator;\n\n    @Inject\n    private ServerConfig serverConfig;\n\n\t@Api(description = \"Get tod version range compatible with this server\")\n\t@Path(\"/check-version\")\n\t@GET\n\tpublic VersionInfo checkVersion() {\n        var versionInfo = new VersionInfo();\n        versionInfo.serverVersion = OneDev.getInstance().getVersion();\n        versionInfo.minRequiredTodVersion = \"4.1.0\";\n        return versionInfo;\n\t}\n\n    private Project getProject(String projectPath) {\n        var project = projectService.findByPath(projectPath);\n        if (project == null || !SecurityUtils.canAccessProject(project))\n            throw new NotFoundException(\"Project not found or inaccessible: \" + projectPath);\n        return project;\n    }\n\n    private ProjectContext getProjectContext(String projectPath, String currentProjectPath) {\n        if (projectPath == null) \n            projectPath = currentProjectPath;\n\n        var projectContext = new ProjectContext();\n        projectContext.project = getProject(projectPath);\n        projectContext.currentProject = getProject(currentProjectPath);\n        \n        return projectContext;\n    }\n\n    private Map<String, Object> getFieldProperties(FieldSpec field) {\n        var fieldProperties = new HashMap<>(IssueHelper.getFieldProperties(field));\n        fieldProperties.put(\"description\", escapeHtml5((String) fieldProperties.get(\"description\")));\n        return fieldProperties;","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/io/onedev/server/ai/TodResource.java#L199-L235","documentation":"Shared lookup helper getProject in TodResource: the given project path either matches no project or the current subject lacks read permission, so every tod endpoint that resolves a project aborts with this error.","triggerScenarios":"Thrown at server-core/src/main/java/io/onedev/server/ai/TodResource.java:217 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the project path spelling and that the project exists.","Authenticate as a user with read access to the project."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d44925c47c37992c828ea673a5f9620539bc3ff2","analyzedAt":"2026-09-06T07:18:27.995Z","contentChangedAt":"2026-09-06T07:18:27.995Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}