{"record":{"id":"6e845dcac0aa0c20","repo":"paperclipai/paperclip","slug":"invalid-name-override-raw-use-slug-name","errorCode":null,"errorMessage":"Invalid --name-override \"${raw}\". Use slug=name.","messagePattern":"Invalid --name-override \"(.+?)\"\\. Use slug=name\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/client/teams.ts","lineNumber":480,"sourceCode":"  return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value);\n}\n\nfunction buildSourcePolicy(opts: TeamPreviewOptions): CatalogTeamSourcePolicy | undefined {\n  const sourcePolicy = removeUndefined({\n    allowExternalSources: opts.allowExternalSources || undefined,\n    allowUnpinnedOptionalSources: opts.allowUnpinnedOptionalSources || undefined,\n    allowLocalPathSources: opts.allowLocalPathSources || undefined,\n  });\n  return Object.keys(sourcePolicy).length > 0 ? sourcePolicy : undefined;\n}\n\nfunction parseNameOverrides(values: string[] | undefined): Record<string, string> | undefined {\n  if (!values || values.length === 0) return undefined;\n  const result: Record<string, string> = {};\n  for (const raw of values) {\n    const [slug, name] = parseKeyValueOption(raw, \"--name-override\", \"slug=name\");\n    if (!slug || !name) {\n      throw new Error(`Invalid --name-override \"${raw}\". Use slug=name.`);\n    }\n    result[slug] = name;\n  }\n  return result;\n}\n\nfunction parseSecretValues(values: string[] | undefined): Record<string, string> | undefined {\n  if (!values || values.length === 0) return undefined;\n  const result: Record<string, string> = {};\n  for (const raw of values) {\n    const [key, value] = parseKeyValueOption(raw, \"--secret-value\", \"key=value\");\n    if (!key) {\n      throw new Error(`Invalid --secret-value \"${raw}\". Use key=value.`);\n    }\n    result[key] = value;\n  }\n  return result;\n}","sourceCodeStart":462,"sourceCodeEnd":498,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/cli/src/commands/client/teams.ts#L462-L498","documentation":"Thrown by parseNameOverrides() when a --name-override value, after splitting on '=' and trimming, yields an empty slug or empty name. Used by `teams preview` and `teams install` to rename imported agents. Note parseKeyValueOption itself throws a different message when there is no '=' at all; this throw is specifically for a '=' present but a blank side (e.g. 'slug=' or whitespace-only slug).","triggerScenarios":"Passing `--name-override slug=` (empty new name), `--name-override =Name` (empty slug — though this may trip the parseKeyValueOption guard first), or a value whose slug side is only whitespace.","commonSituations":"Typing the flag without the new name, misordered arguments, or a generated command that emits an empty value pair.","solutions":["Format as `--name-override <slug>=<name>` with both sides non-empty, e.g. `--name-override reviewer=SeniorReviewer`.","Confirm the slug matches an agent slug declared by the catalog team.","If scripting, validate each entry matches /^[^=]+=[^=]+$/ and that both trimmed halves are non-empty."],"exampleFix":"# before\npaperclipai teams install <ref> --name-override reviewer=\n# after\npaperclipai teams install <ref> --name-override reviewer=SeniorReviewer","handlingStrategy":"validation","validationCode":"function validNameOverride(v: string): boolean {\n  const i = v.indexOf(\"=\");\n  if (i <= 0) return false;\n  const slug = v.slice(0, i).trim();\n  const name = v.slice(i + 1).trim();\n  return slug.length > 0 && name.length > 0;\n}\nfor (const v of nameOverrides) {\n  if (!validNameOverride(v)) throw new Error(`Bad --name-override \"${v}\". Use slug=name.`);\n}","typeGuard":"function isNameOverride(v: string): boolean {\n  const i = v.indexOf(\"=\");\n  return i > 0 && v.slice(0, i).trim().length > 0 && v.slice(i + 1).trim().length > 0;\n}","tryCatchPattern":null,"preventionTips":["Always format --name-override as slug=name with both sides non-empty.","Validate each pair against /^[^=]+=[^=]+$/ plus a non-empty trim check.","Generate overrides from a trusted mapping table, not free text."],"tags":["cli","validation","teams","parsing","name-override"],"backgroundTag":null,"analyzedSha":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}