{"record":{"id":"e1002bf87d4d800a","repo":"musistudio/claude-code-router","slug":"plugin-app-url-must-be-an-http-s-url-or-a-ccr-gat","errorCode":null,"errorMessage":"Plugin app URL must be an http(s) URL or a CCR gateway path.","messagePattern":"Plugin app URL must be an http\\(s\\) URL or a CCR gateway path\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/plugins/service.ts","lineNumber":1095,"sourceCode":"    name,\n    pluginId,\n    url\n  };\n}\n\nfunction normalizePluginAppUrl(value: string | undefined): string {\n  const trimmed = value?.trim() || \"\";\n  if (!trimmed) {\n    return \"\";\n  }\n  if (/^https?:\\/\\//i.test(trimmed)) {\n    return new URL(trimmed).toString();\n  }\n  if (trimmed.startsWith(\"//\")) {\n    throw new Error(\"Plugin app URL cannot be protocol-relative.\");\n  }\n  if (isProtocolSpecifier(trimmed)) {\n    throw new Error(\"Plugin app URL must be an http(s) URL or a CCR gateway path.\");\n  }\n  return trimmed.startsWith(\"/\") ? trimmed : `/${trimmed}`;\n}\n\nfunction normalizeMethods(route: GatewayPluginRouteRegistration): string[] | undefined {\n  const methods = [...(route.methods ?? []), ...(route.method ? [route.method] : [])]\n    .map((method) => method.trim().toUpperCase())\n    .filter(Boolean);\n  return methods.length ? [...new Set(methods)] : undefined;\n}\n\nfunction normalizeRoutePath(value: string | undefined): string | undefined {\n  if (typeof value !== \"string\" || !value.trim()) {\n    return undefined;\n  }\n  const trimmed = value.trim();\n  return trimmed.startsWith(\"/\") ? trimmed : `/${trimmed}`;\n}","sourceCodeStart":1077,"sourceCodeEnd":1113,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/core/src/plugins/service.ts#L1077-L1113","documentation":"Error \"Plugin app URL must be an http(s) URL or a CCR gateway path.\" thrown in musistudio/claude-code-router.","triggerScenarios":"Thrown at packages/core/src/plugins/service.ts:1095 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"}