{"record":{"id":"1598baa668f506d0","repo":"paperclipai/paperclip","slug":"applying-a-company-import-with-json-requires-y","errorCode":null,"errorMessage":"Applying a company import with --json requires --yes. Use --dry-run first to inspect the preview.","messagePattern":"Applying a company import with --json requires --yes\\. Use --dry-run first to inspect the preview\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/client/company.ts","lineNumber":809,"sourceCode":"export function buildCompanyDashboardUrl(apiBase: string, issuePrefix: string): string {\n  const url = new URL(apiBase);\n  const normalizedPrefix = issuePrefix.trim().replace(/^\\/+|\\/+$/g, \"\");\n  url.pathname = `${url.pathname.replace(/\\/+$/, \"\")}/${normalizedPrefix}/dashboard`;\n  url.search = \"\";\n  url.hash = \"\";\n  return url.toString();\n}\n\nexport function resolveCompanyImportApplyConfirmationMode(input: {\n  yes?: boolean;\n  interactive: boolean;\n  json: boolean;\n}): \"skip\" | \"prompt\" {\n  if (input.yes) {\n    return \"skip\";\n  }\n  if (input.json) {\n    throw new Error(\n      \"Applying a company import with --json requires --yes. Use --dry-run first to inspect the preview.\",\n    );\n  }\n  if (!input.interactive) {\n    throw new Error(\n      \"Applying a company import from a non-interactive terminal requires --yes. Use --dry-run first to inspect the preview.\",\n    );\n  }\n  return \"prompt\";\n}\n\nexport function isHttpUrl(input: string): boolean {\n  return /^https?:\\/\\//i.test(input.trim());\n}\n\nexport function looksLikeRepoUrl(input: string): boolean {\n  try {\n    const url = new URL(input.trim());","sourceCodeStart":791,"sourceCodeEnd":827,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/cli/src/commands/client/company.ts#L791-L827","documentation":"resolveCompanyImportApplyConfirmationMode refuses to apply (non-dry-run) an import when --json is set without --yes, because JSON output mode cannot show the interactive confirmation prompt.","triggerScenarios":"Thrown at cli/src/commands/client/company.ts:809 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run with --dry-run first to inspect the preview, then re-run with --yes to apply."],"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"}