{"record":{"id":"7a654dc18d593b71","repo":"paperclipai/paperclip","slug":"test-run-not-found","errorCode":null,"errorMessage":"Test run not found","messagePattern":"Test run not found","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"server/src/routes/company-skills.ts","lineNumber":572,"sourceCode":"\n  router.get(\"/companies/:companyId/skills/:skillId/test-runs\", async (req, res) => {\n    const companyId = req.params.companyId as string;\n    const skillId = req.params.skillId as string;\n    assertCompanyAccess(req, companyId);\n    const query = companySkillTestRunListQuerySchema.parse({\n      inputId: firstQueryString(req.query.inputId),\n    });\n    res.json(await svc.listTestRuns(companyId, skillId, query));\n  });\n\n  router.get(\"/companies/:companyId/skills/:skillId/test-runs/:runId\", async (req, res) => {\n    const companyId = req.params.companyId as string;\n    const skillId = req.params.skillId as string;\n    const runId = req.params.runId as string;\n    assertCompanyAccess(req, companyId);\n    const result = await svc.getTestRunDetail(companyId, skillId, runId);\n    if (!result) {\n      res.status(404).json({ error: \"Test run not found\" });\n      return;\n    }\n    res.json(result);\n  });\n\n  router.post(\n    \"/companies/:companyId/skills/:skillId/test-runs\",\n    validate(companySkillTestRunCreateSchema),\n    async (req, res) => {\n      const companyId = req.params.companyId as string;\n      const skillId = req.params.skillId as string;\n      await assertCanMutateCompanySkills(req, companyId, \"skills.test\", () => skillPolicyResource({ companyId, skillId }));\n      await assertCanOrchestrateSkillTestHarness(req, companyId, {\n        assigneeAgentId: req.body.agentId,\n      });\n      const actor = getActorInfo(req);\n      const result = await svc.createTestRun(companyId, skillId, req.body, skillActor(req), {\n        createHarnessIssue: async (harnessIssue) => {","sourceCodeStart":554,"sourceCodeEnd":590,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/server/src/routes/company-skills.ts#L554-L590","documentation":"Error \"Test run not found\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at server/src/routes/company-skills.ts:572 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-14T05:17:10.506Z"}