{"record":{"id":"0d2cd08522f55edb","repo":"paperclipai/paperclip","slug":"pass-exactly-one-of-firstname-or-secondname","errorCode":null,"errorMessage":"Pass exactly one of ${firstName} or ${secondName}.","messagePattern":"Pass exactly one of (.+?) or (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/pipelines.ts","lineNumber":730,"sourceCode":"  const parsed = Number(value);\n  if (!Number.isInteger(parsed) || parsed <= 0) throw new Error(`Invalid ${label}: ${value}`);\n  return parsed;\n}\n\nfunction parseCsv(value: string): string[] {\n  return value.split(\",\").map((item) => item.trim()).filter(Boolean);\n}\n\nfunction setIfDefined(target: JsonObject, key: string, value: unknown): void {\n  if (value !== undefined) target[key] = value;\n}\n\nfunction looksLikeUuid(value: string): boolean {\n  return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value);\n}\n\nfunction exactlyOneFlag(first: boolean | undefined, second: boolean | undefined, firstName: string, secondName: string): string {\n  if (Boolean(first) === Boolean(second)) throw new Error(`Pass exactly one of ${firstName} or ${secondName}.`);\n  return first ? firstName : secondName;\n}\n\nfunction reviewDecisionFromOptions(opts: ReviewOptions): \"approve\" | \"reject\" | \"request_changes\" {\n  const selected = [\n    opts.approve ? { flag: \"--approve\", decision: \"approve\" as const } : null,\n    opts.reject ? { flag: \"--reject\", decision: \"reject\" as const } : null,\n    opts.requestChanges ? { flag: \"--request-changes\", decision: \"request_changes\" as const } : null,\n  ].filter((item): item is NonNullable<typeof item> => item !== null);\n  if (selected.length !== 1) {\n    throw new Error(\"Pass exactly one of --approve, --reject, or --request-changes.\");\n  }\n  return selected[0]!.decision;\n}\n\nfunction printPipeline(row: PipelineDetail | PipelineSummary | null, ctx: ResolvedClientContext): void {\n  if (!row) return printOutput(null, { json: ctx.json });\n  if (ctx.json) return printOutput(row, { json: true });","sourceCodeStart":712,"sourceCodeEnd":748,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/cli/src/commands/pipelines.ts#L712-L748","documentation":"exactlyOneFlag found both or neither of two mutually exclusive boolean options set, so the command cannot tell which of the two modes was requested.","triggerScenarios":"Thrown at cli/src/commands/pipelines.ts:730 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass exactly one of the two named options."],"exampleFix":null,"handlingStrategy":"validation","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-23T08:17:48.524Z"}