{"record":{"id":"883cb9261afeed37","repo":"stablyai/orca","slug":"linear-invalid-url","errorCode":"linear_invalid_url","errorMessage":"--url must be an absolute http(s) URL","messagePattern":"--url must be an absolute http\\(s\\) URL","errorType":"validation","errorClass":"RuntimeClientError","httpStatus":null,"severity":"error","filePath":"src/cli/linear-request-builders.ts","lineNumber":222,"sourceCode":"  }\n  const writeId = getRequiredStringFlag(flags, 'write-id')\n  if (!isLinearUuid(writeId)) {\n    throw new RuntimeClientError('linear_invalid_write_id', '--write-id must be a UUID')\n  }\n  return writeId\n}\n\nexport function getHttpUrlFlag(flags: Map<string, string | boolean>, name: string): string {\n  const value = getRequiredStringFlag(flags, name)\n  try {\n    const parsed = new URL(value)\n    if (parsed.protocol === 'http:' || parsed.protocol === 'https:') {\n      return value\n    }\n  } catch {\n    // Fall through to the stable Linear error below.\n  }\n  throw new RuntimeClientError('linear_invalid_url', '--url must be an absolute http(s) URL')\n}\n\nexport function readLinearBody(\n  flags: Map<string, string | boolean>,\n  cwd: string,\n  options: { required: true }\n): Promise<string>\nexport function readLinearBody(\n  flags: Map<string, string | boolean>,\n  cwd: string,\n  options: { required: false }\n): Promise<string | undefined>\nexport async function readLinearBody(\n  flags: Map<string, string | boolean>,\n  cwd: string,\n  options: { required: boolean }\n): Promise<string | undefined> {\n  const hasBody = flags.has('body')","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/cli/linear-request-builders.ts#L204-L240","documentation":"Thrown by getHttpUrlFlag when the `--url` flag (or any flag routed through this helper) is not an absolute http: or https: URL. The URL is parsed with `new URL(value)`; if parsing throws or the protocol is anything other than http/https (e.g. file:, ftp:, or a bare string), the error is raised. The parse failure is intentionally swallowed so the user sees the stable Linear error rather than a Node URL exception.","triggerScenarios":"Passing a relative path (`--url /issue/123`), a bare hostname without scheme (`--url linear.app`), a non-http protocol (`--url ftp://...`), or a malformed string to a command that consumes `--url` via getHttpUrlFlag.","commonSituations":"Copying a URL fragment without the scheme. Assuming `//host/path` is accepted. Passing a Linear app deep link that uses a custom scheme. Env-var expansion producing an empty or partial URL.","solutions":["Prefix the value with `https://`: `--url https://linear.app/issue/LIN-123`.","Verify the value with `new URL(value)` in a preflight check before invoking the CLI.","Ensure env vars feeding `--url` are non-empty and include the scheme."],"exampleFix":"// before\nlinear issue --url linear.app/issue/LIN-123\n// after\nlinear issue --url https://linear.app/issue/LIN-123","handlingStrategy":"type-guard","validationCode":"function asHttpUrl(value: string): string {\n  const u = new URL(value)\n  if (u.protocol !== 'http:' && u.protocol !== 'https:') {\n    throw new Error(`Expected http(s) URL, got ${u.protocol}`)\n  }\n  return value\n}\nasHttpUrl(flags.get('url')!)","typeGuard":"function isAbsoluteHttpUrl(value: string): boolean {\n  try {\n    const u = new URL(value)\n    return u.protocol === 'http:' || u.protocol === 'https:'\n  } catch {\n    return false\n  }\n}","tryCatchPattern":null,"preventionTips":["Always include the `https://` scheme in URLs passed to the CLI.","Validate URLs with `new URL()` in a preflight before invoking."],"tags":["linear","cli","flag-validation","url","validation"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}