{"record":{"id":"1ef0c1e620336ce9","repo":"paperclipai/paperclip","slug":"folder-not-found","errorCode":null,"errorMessage":"Folder not found","messagePattern":"Folder not found","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"server/src/routes/folders.ts","lineNumber":85,"sourceCode":"        agentId: actor.agentId,\n        runId: actor.runId,\n        agentApiKeyId: actor.agentApiKeyId,\n        action: \"folder.personal_ensured\",\n        entityType: \"folder\",\n        entityId: folder.id,\n        details: { path: folder.path, systemKey: folder.systemKey },\n      });\n      res.json(folder);\n    },\n  );\n\n  router.patch(\"/companies/:companyId/folders/:folderId\", validate(updateFolderSchema), async (req, res) => {\n    const companyId = req.params.companyId as string;\n    const folderId = req.params.folderId as string;\n    assertCompanyAccess(req, companyId);\n    const updated = await svc.update(companyId, folderId, req.body);\n    if (!updated) {\n      res.status(404).json({ error: \"Folder not found\" });\n      return;\n    }\n    const actor = getActorInfo(req);\n    await logActivity(db, {\n      companyId,\n      actorType: actor.actorType,\n      actorId: actor.actorId,\n      agentId: actor.agentId,\n      runId: actor.runId,\n      agentApiKeyId: actor.agentApiKeyId,\n      action: \"folder.updated\",\n      entityType: \"folder\",\n      entityId: updated.id,\n      details: { kind: updated.kind, name: updated.name, path: updated.path, position: updated.position },\n    });\n    res.json(updated);\n  });\n","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/server/src/routes/folders.ts#L67-L103","documentation":"Error \"Folder not found\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at server/src/routes/folders.ts:85 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the id in the request path or body refers to an existing record in this company; re-list the parent collection to get a valid id.","Check that the record was not deleted or archived, and that the request is scoped to the correct companyId."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}