{"record":{"id":"79ffa4faaf6122b6","repo":"paperclipai/paperclip","slug":"routine-run-run-id-failed-failurereason","errorCode":null,"errorMessage":"Routine run ${run.id} failed: ${failureReason}","messagePattern":"Routine run (.+?) failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/src/services/pipelines.ts","lineNumber":3011,"sourceCode":"          variables,\n        },\n        variables,\n        descriptionAppendix: [\n          buildPipelineAutomationIssueTitlePrefix(detail),\n          buildPipelineStageEntryPreamble(detail),\n          buildPipelineCaseContextMarkdown({\n            ...detail,\n            breakdownMechanics,\n            triggeringEventId: execution.triggeringEventId,\n            outputSummaries,\n          }),\n        ].filter(Boolean).join(\"\\n\\n\"),\n      });\n      if (!run.linkedIssueId) {\n        const failureReason = typeof run.failureReason === \"string\" && run.failureReason.trim().length > 0\n          ? run.failureReason.trim()\n          : null;\n        throw new Error(\n          failureReason\n            ? `Routine run ${run.id} failed: ${failureReason}`\n            : `Routine run ${run.id} did not create or coalesce an execution issue`,\n        );\n      }\n      const [updated] = await db\n        .update(pipelineAutomationExecutions)\n        .set({\n          status: \"succeeded\",\n          executionIssueId: run.linkedIssueId,\n          error: null,\n          updatedAt: nowDate(),\n        })\n        .where(eq(pipelineAutomationExecutions.id, execution.id))\n        .returning();\n      await db\n        .insert(pipelineCaseIssueLinks)\n        .values({","sourceCodeStart":2993,"sourceCodeEnd":3029,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/server/src/services/pipelines.ts#L2993-L3029","documentation":"Post-run check in pipeline automation execution: the routine run recorded a failureReason, so the run is marked failed and the reason is surfaced in the error/log message. It is a reporting sentinel wrapping whatever downstream step failed, not a distinct fault; inspect run.failureReason for the root cause.","triggerScenarios":"Thrown at server/src/services/pipelines.ts:3011 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the failure reason in the message and the run logs, fix the cause, and rerun the routine."],"exampleFix":null,"handlingStrategy":"try-catch","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"}