{"record":{"id":"71d9045799aee4e8","repo":"paperclipai/paperclip","slug":"routine-trigger-not-found","errorCode":null,"errorMessage":"Routine trigger not found","messagePattern":"Routine trigger not found","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"server/src/routes/routines.ts","lineNumber":503,"sourceCode":"      entityType: \"routine_trigger\",\n      entityId: created.trigger.id,\n      details: { routineId: routine.id, kind: created.trigger.kind },\n    });\n    await logRoutineRevisionCreated(req, {\n      companyId: routine.companyId,\n      routineId: routine.id,\n      revisionId: created.revision.id,\n      revisionNumber: created.revision.revisionNumber,\n      changeSummary: created.revision.changeSummary,\n      triggerCount: created.revision.snapshot.triggers.length,\n    });\n    res.status(201).json(created);\n  });\n\n  router.patch(\"/routine-triggers/:id\", validate(updateRoutineTriggerSchema), async (req, res) => {\n    const trigger = await svc.getTrigger(req.params.id as string);\n    if (!trigger) {\n      res.status(404).json({ error: \"Routine trigger not found\" });\n      return;\n    }\n    const routine = await assertCanManageExistingRoutine(req, trigger.routineId);\n    if (!routine) {\n      res.status(404).json({ error: \"Routine trigger not found\" });\n      return;\n    }\n    await assertBoardCanAssignTasks(req, routine.companyId);\n    const updated = await svc.updateTrigger(trigger.id, req.body, {\n      agentId: req.actor.type === \"agent\" ? req.actor.agentId : null,\n      userId: req.actor.type === \"board\" ? req.actor.userId ?? \"board\" : null,\n      runId: req.actor.runId ?? null,\n    });\n    const actor = getActorInfo(req);\n    await logActivity(db, {\n      companyId: routine.companyId,\n      actorType: actor.actorType,\n      actorId: actor.actorId,","sourceCodeStart":485,"sourceCodeEnd":521,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/server/src/routes/routines.ts#L485-L521","documentation":"Error \"Routine trigger not found\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at server/src/routes/routines.ts:503 when the library encounters an invalid state.","commonSituations":"Returned when operating on a routine trigger id that does not exist for the routine/company.","solutions":["Verify the routine trigger id is correct.","List the routine's triggers to find the valid trigger id; it may have been deleted."],"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"}