{"record":{"id":"f7e1b9ff6fdb8309","repo":"musistudio/claude-code-router","slug":"profile-name-is-required","errorCode":null,"errorMessage":"Profile name is required.","messagePattern":"Profile name is required\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/profiles/launch-core.ts","lineNumber":26,"sourceCode":"\nexport type ProfileLaunchPlan = {\n  args: string[];\n  command: string;\n  env: Record<string, string>;\n  profile: ProfileConfig;\n  surface: ProfileOpenSurface;\n};\n\nexport type ProfileLaunchSpawnCommand = {\n  args: string[];\n  command: string;\n  windowsVerbatimArguments?: boolean;\n};\n\nexport function findProfileForOpen(config: Pick<AppConfig, \"profile\">, profileRef: string): ProfileConfig {\n  const needle = profileRef.trim();\n  if (!needle) {\n    throw new Error(\"Profile name is required.\");\n  }\n\n  const profiles = config.profile.profiles.filter((profile) => profile.enabled);\n  const exactId = profiles.find((profile) => profile.id === needle);\n  if (exactId) {\n    return exactId;\n  }\n\n  const normalizedNeedle = normalizeLookupValue(needle);\n  const matches = profiles.filter((profile) =>\n    normalizeLookupValue(profile.name) === normalizedNeedle ||\n    normalizeLookupValue(profile.id) === normalizedNeedle ||\n    sanitizePathSegment(profile.name) === normalizedNeedle ||\n    sanitizePathSegment(profile.id) === normalizedNeedle\n  );\n  if (matches.length === 1) {\n    return matches[0];\n  }","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/core/src/profiles/launch-core.ts#L8-L44","documentation":"Error \"Profile name is required.\" thrown in musistudio/claude-code-router.","triggerScenarios":"Thrown at packages/core/src/profiles/launch-core.ts:26 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"99f24806c6a2c660b16e53e95211c517448a6c90","analyzedAt":"2026-08-27T04:11:01.184Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}