{"record":{"id":"60bcc688954bc7be","repo":"stablyai/orca","slug":"invalid-argument-60bcc6","errorCode":"invalid_argument","errorMessage":"--type must be blocks, blocked-by, related, or duplicate-of","messagePattern":"--type must be blocks, blocked-by, related, or duplicate-of","errorType":"exception","errorClass":"RuntimeClientError","httpStatus":null,"severity":"error","filePath":"src/cli/handlers/linear-relation-write.ts","lineNumber":40,"sourceCode":"    }\n    const response = await client.call<LinearIssueRelationWriteResult>(\n      'linear.issueRelationWrite',\n      request,\n      { timeoutMs: LINEAR_WRITE_TIMEOUT_MS }\n    )\n    printResult(response, json, formatLinearRelationWrite)\n  }\n}\n\nfunction parseRelationship(value: string): LinearIssueRelationship {\n  const relationship = {\n    blocks: 'blocks',\n    'blocked-by': 'blockedBy',\n    related: 'relatedTo',\n    'duplicate-of': 'duplicateOf'\n  }[value]\n  if (!relationship) {\n    throw new RuntimeClientError(\n      'invalid_argument',\n      '--type must be blocks, blocked-by, related, or duplicate-of'\n    )\n  }\n  return relationship as LinearIssueRelationship\n}\n","sourceCodeStart":22,"sourceCodeEnd":47,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/cli/handlers/linear-relation-write.ts#L22-L47","documentation":"Thrown by parseRelationship in linear-relation-write.ts when --type is not one of the four supported relationship kinds. The handler maps the CLI token to Linear's internal relationship enum: blocks->blocks, blocked-by->blockedBy, related->relatedTo, duplicate-of->duplicateOf. Any token not in that map yields invalid_argument.","triggerScenarios":"Passing --type with a value like 'blocks-by', 'related-to', 'duplicate', 'parent', 'subtask', or any token not exactly matching blocks/blocked-by/related/duplicate-of.","commonSituations":"Using the internal Linear enum name (e.g. 'blockedBy') instead of the CLI token; using a synonym ('duplicates'); typos; hyphen placement mistakes.","solutions":["Use one of the exact CLI tokens: blocks, blocked-by, related, or duplicate-of.","Remember the CLI uses kebab-case tokens, not the camelCase Linear API enum names.","Check the command help for the accepted --type values."],"exampleFix":"// before\norca linear relation create --type blockedBy --from XYZ-1 --to XYZ-2\n// after\norca linear relation create --type blocked-by --from XYZ-1 --to XYZ-2","handlingStrategy":"validation","validationCode":"const RELATIONSHIP_TOKENS = new Set(['blocks', 'blocked-by', 'related', 'duplicate-of']);\nif (!RELATIONSHIP_TOKENS.has(typeToken)) {\n  throw new Error(`--type '${typeToken}' is invalid; use blocks, blocked-by, related, or duplicate-of`);\n}","typeGuard":"function isLinearRelationType(value: unknown): value is 'blocks' | 'blocked-by' | 'related' | 'duplicate-of' {\n  return value === 'blocks' || value === 'blocked-by' || value === 'related' || value === 'duplicate-of';\n}","tryCatchPattern":null,"preventionTips":["Use the kebab-case CLI tokens, not the camelCase Linear enum names.","Cross-check the accepted tokens against the command help."],"tags":["cli","linear","argument-validation","enum-validation","relationship"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}