{"record":{"id":"e27152f1996d6ffa","repo":"different-ai/openwork","slug":"the-selected-mcp-server-server-name-must-use","errorCode":null,"errorMessage":"The selected MCP server \"${server.name}\" must use HTTPS.","messagePattern":"The selected MCP server \"(.+?)\" must use HTTPS\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ee/apps/den-web/app/(den)/dashboard/_components/plugin-import-draft.ts","lineNumber":114,"sourceCode":"  if (url.protocol !== \"https:\" || (url.hostname !== \"github.com\" && url.hostname !== \"www.github.com\")) {\n    throw new Error(\"Plugin imports must use an HTTPS github.com URL.\");\n  }\n  if (url.username || url.password || url.search || url.hash) {\n    throw new Error(\"GitHub plugin URLs cannot include credentials, query parameters, or fragments.\");\n  }\n  return url.toString();\n}\n\nfunction validateSelectedServerUrl(server: PluginImportServer): void {\n  if (!server.url) throw new Error(`The selected MCP server \"${server.name}\" does not have a remote URL.`);\n  let url: URL;\n  try {\n    url = new URL(server.url);\n  } catch {\n    throw new Error(`The selected MCP server \"${server.name}\" has an invalid URL.`);\n  }\n  if (url.protocol !== \"https:\") {\n    throw new Error(`The selected MCP server \"${server.name}\" must use HTTPS.`);\n  }\n  if (url.username || url.password || url.hash || hasCredentialQuery(url)) {\n    throw new Error(`The selected MCP server \"${server.name}\" URL cannot contain credentials or a fragment.`);\n  }\n}\n\nexport function parsePluginImportPreview(payload: unknown): PluginImportPreview {\n  const item = isRecord(payload) && isRecord(payload.item) ? payload.item : null;\n  if (!item) throw new Error(\"GitHub plugin import preview response was incomplete.\");\n\n  return {\n    repositoryFullName: typeof item.repositoryFullName === \"string\" ? item.repositoryFullName : \"\",\n    rootPath: typeof item.rootPath === \"string\" ? item.rootPath : \"\",\n    servers: Array.isArray(item.servers)\n      ? item.servers.flatMap((entry) => {\n          if (!isRecord(entry) || typeof entry.name !== \"string\") return [];\n          return [{\n            name: entry.name,","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/ee/apps/den-web/app/(den)/dashboard/_components/plugin-import-draft.ts#L96-L132","documentation":"Error \"The selected MCP server \"${server.name}\" must use HTTPS.\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at ee/apps/den-web/app/(den)/dashboard/_components/plugin-import-draft.ts:114 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":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}