{"record":{"id":"d8c2c41da6128de5","repo":"musistudio/claude-code-router","slug":"no-ccr-api-key-was-found-for-profile-profile-na","errorCode":null,"errorMessage":"No CCR API key was found for profile \"${profile.name || profile.id}\". Re-save the profile and try again.","messagePattern":"No CCR API key was found for profile \"(.+?)\"\\. Re-save the profile and try again\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/profiles/launch-service.ts","lineNumber":760,"sourceCode":"function profileGatewayEndpoint(config: AppConfig): string {\n  const host = probeGatewayHost(config.gateway.host);\n  return endpoint(host, config.gateway.port);\n}\n\nfunction probeGatewayHost(host: string): string {\n  if (!host || host === \"0.0.0.0\") {\n    return \"127.0.0.1\";\n  }\n  if (host === \"::\") {\n    return \"::1\";\n  }\n  return host;\n}\n\nfunction profileGatewayConfigFor(config: AppConfig, profile: ReturnType<typeof findProfileForOpen>): AppConfig {\n  const token = findProfileApiKey(config, profile);\n  if (!token) {\n    throw new Error(`No CCR API key was found for profile \"${profile.name || profile.id}\". Re-save the profile and try again.`);\n  }\n  return profileGatewayConfigWithToken(config, profile, token);\n}\n\nfunction profileGatewayConfigWithToken(config: AppConfig, profile: ReturnType<typeof findProfileForOpen>, token: string): AppConfig {\n  return {\n    ...config,\n    APIKEY: token,\n    APIKEYS: [\n      {\n        createdAt: new Date().toISOString(),\n        id: profileApiKeyId(profile),\n        key: token,\n        name: `Profile: ${profile.name?.trim() || profile.id || profile.agent}`\n      }\n    ]\n  };\n}","sourceCodeStart":742,"sourceCodeEnd":778,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/core/src/profiles/launch-service.ts#L742-L778","documentation":"Error \"No CCR API key was found for profile \"${profile.name || profile.id}\". Re-save the profile and try again.\" thrown in musistudio/claude-code-router.","triggerScenarios":"Thrown at packages/core/src/profiles/launch-service.ts:760 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"}