{"record":{"id":"e24c04980870310b","repo":"langgenius/dify","slug":"download-marketplace-package-for-getpluginid-plu","errorCode":null,"errorMessage":"Download marketplace package for ${getPluginId(pluginUniqueIdentifier)} failed with ${response.status} ${response.statusText}.","messagePattern":"Download marketplace package for (.+?) failed with (.+?) (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"e2e/support/marketplace-plugins.ts","lineNumber":113,"sourceCode":"    }\n  }\n\n  return { ok: false as const, reason: `Plugin install task did not finish within ${timeoutMs}ms.` }\n}\n\nconst getMarketplaceDownloadUrl = (pluginUniqueIdentifier: string) => {\n  const url = new URL(\n    '/api/v1/plugins/download-url',\n    process.env.E2E_MARKETPLACE_API_URL || defaultMarketplaceApiUrl,\n  )\n  url.searchParams.set('unique_identifier', pluginUniqueIdentifier)\n  return url.toString()\n}\n\nconst downloadMarketplacePluginPackage = async (pluginUniqueIdentifier: string) => {\n  const response = await fetch(getMarketplaceDownloadUrl(pluginUniqueIdentifier))\n  if (!response.ok) {\n    throw new Error(\n      `Download marketplace package for ${getPluginId(pluginUniqueIdentifier)} failed with ${response.status} ${response.statusText}.`,\n    )\n  }\n\n  return Buffer.from(await response.arrayBuffer())\n}\n\nconst uploadMarketplacePluginPackage = async (\n  client: ConsoleClient,\n  pluginUniqueIdentifier: string,\n) => {\n  const pkg = await downloadMarketplacePluginPackage(pluginUniqueIdentifier)\n  const fileName = `${getPluginId(pluginUniqueIdentifier).replaceAll('/', '-')}.difypkg`\n  const response = await client.workspaces.current.plugin.upload.pkg.post({\n    body: {\n      pkg: new File([Uint8Array.from(pkg)], fileName, { type: 'application/octet-stream' }),\n    },\n  })","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/e2e/support/marketplace-plugins.ts#L95-L131","documentation":"Error \"Download marketplace package for ${getPluginId(pluginUniqueIdentifier)} failed with ${response.status} ${response.statusText}.\" thrown in langgenius/dify.","triggerScenarios":"Thrown at e2e/support/marketplace-plugins.ts:113 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":"ef8544b173fd6cd7a8e71df2cab576e52bebbfbc","analyzedAt":"2026-08-12T05:15:17.394Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}