paperclipai/paperclip · error · Error
Confirmation ' ' does not match target company. Expected ID…
Error message
Confirmation '${confirm}' does not match target company. Expected ID '${company.id}' or prefix '${company.issuePrefix}'. What it means
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.
Solutions
- Pass --confirm with the exact company ID or issue prefix shown in the error.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cli/src/commands/client/company.ts:1328 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18).
Data as JSON: /api/errors/d700eea6ed5200cc.
Report an issue: GitHub.
Appendix: source
Thrown at cli/src/commands/client/company.ts:1328
);
}
export function assertDeleteConfirmation(company: Company, opts: CompanyDeleteOptions): void {
if (!opts.yes) {
throw new Error("Deletion requires --yes.");
}
const confirm = opts.confirm?.trim();
if (!confirm) {
throw new Error(
"Deletion requires --confirm <value> where value matches the company ID or issue prefix.",
);
}
const confirmsById = confirm === company.id;
const confirmsByPrefix = confirm.toUpperCase() === company.issuePrefix.toUpperCase();
if (!confirmsById && !confirmsByPrefix) {
throw new Error(
`Confirmation '${confirm}' does not match target company. Expected ID '${company.id}' or prefix '${company.issuePrefix}'.`,
);
}
}
function assertDeleteFlags(opts: CompanyDeleteOptions): void {
if (!opts.yes) {
throw new Error("Deletion requires --yes.");
}
if (!opts.confirm?.trim()) {
throw new Error(
"Deletion requires --confirm <value> where value matches the company ID or issue prefix.",
);
}
}
export function registerCompanyCommands(program: Command): void {
const company = program.command("company").description("Company operations");View on GitHub (pinned to 120ae5428f)