{"record":{"id":"d71e884eb49f7369","repo":"paperclipai/paperclip","slug":"pipeline-not-found-by-key-or-id-pipeline","errorCode":null,"errorMessage":"Pipeline not found by key or id: ${pipeline}","messagePattern":"Pipeline not found by key or id: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/pipelines.ts","lineNumber":647,"sourceCode":"        const ctx = resolvePipelineContext(opts);\n        printOutput(await ctx.api.post(apiPath`/api/cases/${caseId}/open-conversation`, {}), { json: ctx.json });\n      })),\n  );\n}\n\nfunction addPipelineOptions(command: Command): Command {\n  return addCommonClientOptions(command, { includeCompany: true });\n}\n\nfunction resolvePipelineContext(opts: PipelineOptions): ResolvedClientContext & { companyId: string } {\n  return resolveCommandContext(opts, { requireCompany: true }) as ResolvedClientContext & { companyId: string };\n}\n\nasync function resolvePipelineId(ctx: ResolvedClientContext & { companyId: string }, pipeline: string): Promise<string> {\n  if (looksLikeUuid(pipeline)) return pipeline;\n  const rows = await ctx.api.get<PipelineSummary[]>(apiPath`/api/companies/${ctx.companyId}/pipelines`) ?? [];\n  const match = rows.find((row) => row.key === pipeline || row.id === pipeline);\n  if (!match) throw new Error(`Pipeline not found by key or id: ${pipeline}`);\n  return match.id;\n}\n\nasync function getPipeline(ctx: ResolvedClientContext & { companyId: string }, pipeline: string): Promise<PipelineDetail> {\n  const pipelineId = await resolvePipelineId(ctx, pipeline);\n  const detail = await ctx.api.get<PipelineDetail>(apiPath`/api/pipelines/${pipelineId}`);\n  if (!detail) throw new Error(`Pipeline not found: ${pipeline}`);\n  return detail;\n}\n\nasync function buildIngestBody(opts: IngestOptions): Promise<JsonObject> {\n  const body: JsonObject = { title: opts.title };\n  setIfDefined(body, \"caseKey\", opts.caseKey);\n  setIfDefined(body, \"summary\", opts.summary);\n  setIfDefined(body, \"stageKey\", opts.stage);\n  setIfDefined(body, \"parentCaseId\", opts.parentCase);\n  if (opts.fieldsJson || opts.fieldsFile) body.fields = await readJsonFromOptions(opts.fieldsJson, opts.fieldsFile);\n  if (opts.workspaceRefJson) body.workspaceRef = parseJson(opts.workspaceRefJson);","sourceCodeStart":629,"sourceCodeEnd":665,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/cli/src/commands/pipelines.ts#L629-L665","documentation":"Error \"Pipeline not found by key or id: ${pipeline}\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at cli/src/commands/pipelines.ts:647 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}