{"record":{"id":"a8ca1b9ee79c7b61","repo":"different-ai/openwork","slug":"the-selected-mcp-server-server-name-url-canno","errorCode":null,"errorMessage":"The selected MCP server \"${server.name}\" URL cannot contain credentials or a fragment.","messagePattern":"The selected MCP server \"(.+?)\" URL cannot contain credentials or a fragment\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ee/apps/den-web/app/(den)/dashboard/_components/plugin-import-draft.ts","lineNumber":117,"sourceCode":"  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,\n            serverKey: typeof entry.serverKey === \"string\" ? entry.serverKey : `${entry.name}:${typeof entry.url === \"string\" ? entry.url : \"\"}`,\n            url: typeof entry.url === \"string\" ? entry.url : null,\n            supported: entry.supported === true,","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/ee/apps/den-web/app/(den)/dashboard/_components/plugin-import-draft.ts#L99-L135","documentation":"Error \"The selected MCP server \"${server.name}\" URL cannot contain credentials or a fragment.\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at ee/apps/den-web/app/(den)/dashboard/_components/plugin-import-draft.ts:117 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"}