{"record":{"id":"d700eea6ed5200cc","repo":"paperclipai/paperclip","slug":"confirmation-confirm-does-not-match-target-co","errorCode":null,"errorMessage":"Confirmation '${confirm}' does not match target company. Expected ID '${company.id}' or prefix '${company.issuePrefix}'.","messagePattern":"Confirmation '(.+?)' does not match target company\\. Expected ID '(.+?)' or prefix '(.+?)'\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/client/company.ts","lineNumber":1328,"sourceCode":"  );\n}\n\nexport function assertDeleteConfirmation(company: Company, opts: CompanyDeleteOptions): void {\n  if (!opts.yes) {\n    throw new Error(\"Deletion requires --yes.\");\n  }\n\n  const confirm = opts.confirm?.trim();\n  if (!confirm) {\n    throw new Error(\n      \"Deletion requires --confirm <value> where value matches the company ID or issue prefix.\",\n    );\n  }\n\n  const confirmsById = confirm === company.id;\n  const confirmsByPrefix = confirm.toUpperCase() === company.issuePrefix.toUpperCase();\n  if (!confirmsById && !confirmsByPrefix) {\n    throw new Error(\n      `Confirmation '${confirm}' does not match target company. Expected ID '${company.id}' or prefix '${company.issuePrefix}'.`,\n    );\n  }\n}\n\nfunction assertDeleteFlags(opts: CompanyDeleteOptions): void {\n  if (!opts.yes) {\n    throw new Error(\"Deletion requires --yes.\");\n  }\n  if (!opts.confirm?.trim()) {\n    throw new Error(\n      \"Deletion requires --confirm <value> where value matches the company ID or issue prefix.\",\n    );\n  }\n}\n\nexport function registerCompanyCommands(program: Command): void {\n  const company = program.command(\"company\").description(\"Company operations\");","sourceCodeStart":1310,"sourceCodeEnd":1346,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/cli/src/commands/client/company.ts#L1310-L1346","documentation":"The --confirm value matched neither the target company's id nor its issuePrefix (case-insensitive), so assertDeleteConfirmation rejects the deletion as aimed at the wrong company.","triggerScenarios":"Thrown at cli/src/commands/client/company.ts:1328 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass --confirm with the exact company ID or issue prefix shown in the error."],"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"}