{"record":{"id":"3173dc5f7756cb88","repo":"oven-sh/bun","slug":"failed-to-download-url-response-statustext","errorCode":null,"errorMessage":"Failed to download ${url}: ${response.statusText}","messagePattern":"Failed to download (.+?): (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bun-debug-adapter-protocol/scripts/generate-protocol.ts","lineNumber":173,"sourceCode":"  return body;\n}\n\nfunction toMethod(name: string): string {\n  return `${name.substring(0, 1).toLowerCase()}${name.substring(1)}`;\n}\n\nfunction toComment(description?: string): string {\n  if (!description) {\n    return \"\";\n  }\n  const lines = [\"/**\", ...description.split(\"\\n\").map(line => ` * ${line.trim()}`), \"*/\"];\n  return lines.join(\"\\n\");\n}\n\nasync function download<T>(url: string | URL): Promise<T> {\n  const response = await fetch(url);\n  if (!response.ok) {\n    throw new Error(`Failed to download ${url}: ${response.statusText}`);\n  }\n  return response.json();\n}\n","sourceCodeStart":155,"sourceCodeEnd":177,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/packages/bun-debug-adapter-protocol/scripts/generate-protocol.ts#L155-L177","documentation":"Thrown by the download() helper in the DAP protocol generator when fetching the schema URL returns a non-OK HTTP status. It indicates a network failure, bad URL, or server error while retrieving the debug-adapter protocol JSON that schema() needs to generate types.","triggerScenarios":"Thrown at packages/bun-debug-adapter-protocol/scripts/generate-protocol.ts:173 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check network access / the schema URL and re-run the generator","Pin a known-good schema revision if the endpoint is temporarily down"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","contentChangedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}