{"record":{"id":"a68929c4befc23d0","repo":"paperclipai/paperclip","slug":"project-not-found","errorCode":null,"errorMessage":"Project not found","messagePattern":"Project not found","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"server/src/routes/projects.ts","lineNumber":291,"sourceCode":"      companyId,\n      actorType: actor.actorType,\n      actorId: actor.actorId,\n      agentId: actor.agentId,\n      action: \"project.created\",\n      entityType: \"project\",\n      entityId: project.id,\n      details: {\n        name: project.name,\n        workspaceId: createdWorkspaceId,\n        envKeys: project.env ? Object.keys(project.env).sort() : [],\n      },\n    });\n    const telemetryClient = getTelemetryClient();\n    if (telemetryClient) {\n      trackProjectCreated(telemetryClient);\n    }\n    res.status(201).json(hydratedProject ?? project);\n  });\n\n  router.patch(\"/projects/:id\", validate(updateProjectSchema), async (req, res) => {\n    const id = req.params.id as string;\n    const existing = await getAccessibleResource(req, res, svc.getById(id), \"Project not found\");\n    if (!existing) return;\n    const body = { ...req.body };\n    assertNoAgentHostWorkspaceCommandMutation(\n      req,\n      collectProjectExecutionWorkspaceCommandPaths(body.executionWorkspacePolicy),\n    );\n    await assertProjectEnvironmentSelection(\n      existing.companyId,\n      readProjectPolicyEnvironmentId(body.executionWorkspacePolicy),\n    );\n    if (typeof body.archivedAt === \"string\") {\n      body.archivedAt = new Date(body.archivedAt);\n    }\n    if (body.env !== undefined) {","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/routes/projects.ts#L273-L309","documentation":"Error \"Project not found\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at server/src/routes/projects.ts:245 when the library encounters an invalid state.","commonSituations":"Returned when the requested project id does not exist within the caller's company scope.","solutions":["Verify the project id in the URL is correct and belongs to the current company.","List projects for the company to find the correct id; the project may have been deleted."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}