{"record":{"id":"3e55972fa22752ae","repo":"musistudio/claude-code-router","slug":"plugin-app-url-cannot-be-protocol-relative","errorCode":null,"errorMessage":"Plugin app URL cannot be protocol-relative.","messagePattern":"Plugin app URL cannot be protocol-relative\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/plugins/service.ts","lineNumber":1092,"sourceCode":"    ...(app.description?.trim() ? { description: app.description.trim() } : {}),\n    ...(app.icon?.trim() ? { icon: app.icon.trim() } : {}),\n    id: app.id?.trim() || sanitizeFileSegment(`${name}-${url}`) || `app-${index}`,\n    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  }","sourceCodeStart":1074,"sourceCodeEnd":1110,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/core/src/plugins/service.ts#L1074-L1110","documentation":"Error \"Plugin app URL cannot be protocol-relative.\" thrown in musistudio/claude-code-router.","triggerScenarios":"Thrown at packages/core/src/plugins/service.ts:1092 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"}