{"record":{"id":"de2072c97c97fec0","repo":"paperclipai/paperclip","slug":"invalid-hostname-raw","errorCode":null,"errorMessage":"Invalid hostname: ${raw}","messagePattern":"Invalid hostname: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/config/hostnames.ts","lineNumber":13,"sourceCode":"export function normalizeHostnameInput(raw: string): string {\n  const input = raw.trim();\n  if (!input) {\n    throw new Error(\"Hostname is required\");\n  }\n\n  try {\n    const url = input.includes(\"://\") ? new URL(input) : new URL(`http://${input}`);\n    const hostname = url.hostname.trim().toLowerCase();\n    if (!hostname) throw new Error(\"Hostname is required\");\n    return hostname;\n  } catch {\n    throw new Error(`Invalid hostname: ${raw}`);\n  }\n}\n\nexport function parseHostnameCsv(raw: string): string[] {\n  if (!raw.trim()) return [];\n  const unique = new Set<string>();\n  for (const part of raw.split(\",\")) {\n    const hostname = normalizeHostnameInput(part);\n    unique.add(hostname);\n  }\n  return Array.from(unique);\n}\n\n","sourceCodeStart":1,"sourceCodeEnd":27,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/cli/src/config/hostnames.ts#L1-L27","documentation":"normalizeHostnameInput parsed the input as a URL (prepending http:// if needed) and extraction of a hostname failed, so the raw input is not a parseable hostname.","triggerScenarios":"Thrown at cli/src/config/hostnames.ts:13 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a valid hostname: letters, digits, dots, and hyphens; no scheme or port."],"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"}