{"record":{"id":"5d2bb65b8edc1b3b","repo":"paperclipai/paperclip","slug":"no-company-found-by-shortname-prefix-selector","errorCode":null,"errorMessage":"No company found by shortname/prefix '${selector}'.","messagePattern":"No company found by shortname/prefix '(.+?)'\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/client/company.ts","lineNumber":1294,"sourceCode":"): Company {\n  const selector = normalizeSelector(selectorRaw);\n  if (!selector) {\n    throw new Error(\"Company selector is required.\");\n  }\n\n  const idMatch = companies.find((company) => company.id === selector);\n  const prefixMatch = companies.find((company) => matchesPrefix(company, selector));\n\n  if (by === \"id\") {\n    if (!idMatch) {\n      throw new Error(`No company found by ID '${selector}'.`);\n    }\n    return idMatch;\n  }\n\n  if (by === \"prefix\") {\n    if (!prefixMatch) {\n      throw new Error(`No company found by shortname/prefix '${selector}'.`);\n    }\n    return prefixMatch;\n  }\n\n  if (idMatch && prefixMatch && idMatch.id !== prefixMatch.id) {\n    throw new Error(\n      `Selector '${selector}' is ambiguous (matches both an ID and a shortname). Re-run with --by id or --by prefix.`,\n    );\n  }\n\n  if (idMatch) return idMatch;\n  if (prefixMatch) return prefixMatch;\n\n  throw new Error(\n    `No company found for selector '${selector}'. Use company ID or issue prefix (for example PAP).`,\n  );\n}\n","sourceCodeStart":1276,"sourceCodeEnd":1312,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/cli/src/commands/client/company.ts#L1276-L1312","documentation":"With --by prefix, no company's issuePrefix matches the selector case-insensitively, so the shortname-mode lookup in resolveCompanyForDeletion failed.","triggerScenarios":"Thrown at cli/src/commands/client/company.ts:1294 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the issue prefix with `paperclipai company list` and re-run with the correct prefix."],"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"}