{"record":{"id":"efb00d7742a75c6c","repo":"Budibase/budibase","slug":"unable-to-retrieve-docker-compose-file-respons","errorCode":null,"errorMessage":"Unable to retrieve docker-compose file - ${response.status}","messagePattern":"Unable to retrieve docker-compose file - (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/utils.ts","lineNumber":21,"sourceCode":"import path, { join } from \"path\"\nimport fetch from \"node-fetch\"\n\nconst progress = require(\"cli-progress\")\n\nexport function downloadFile(url: string, filePath: string) {\n  return new Promise((resolve, reject) => {\n    filePath = path.resolve(filePath)\n    fetch(url, {\n      method: \"GET\",\n    })\n      .then(response => {\n        const writer = fs.createWriteStream(filePath)\n        if (response.body) {\n          response.body.pipe(writer)\n          response.body.on(\"end\", resolve)\n          response.body.on(\"error\", reject)\n        } else {\n          throw new Error(\n            `Unable to retrieve docker-compose file - ${response.status}`\n          )\n        }\n      })\n      .catch(err => {\n        throw err\n      })\n  })\n}\n\nexport async function httpCall(url: string, method: string) {\n  const response = await fetch(url, {\n    method,\n  })\n  return response.body\n}\n\nexport function getHelpDescription(str: string) {","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/cli/src/utils.ts#L3-L39","documentation":"downloadFile streams an HTTP response (e.g. the docker-compose file) into a file on disk. If the response completed but has no body to pipe, it throws with the response status, indicating the remote resource could not be retrieved.","triggerScenarios":"Calling the CLI utility that downloads the docker-compose file when the axios-style response resolves without a body — typically 4xx/5xx statuses (404, 502) or an empty/failed response for the compose URL.","commonSituations":"URL for docker-compose moved or 404s; proxy/VPN returning an error page with no body; server outage returning 5xx; offline machine where the request errors out.","solutions":["Check the reported status code in the message and curl the docker-compose URL to confirm availability","Fix network/proxy settings so the host is reachable, then re-run","Pin/update the CLI to a version pointing at a valid docker-compose URL","Retry later if the remote server is temporarily down"],"exampleFix":"// diagnose\ncurl -I https://raw.githubusercontent.com/Budibase/budibase/master/hosting/docker-compose.yaml\n// if 404, update CLI to a version with the corrected URL, then re-run","handlingStrategy":"try-catch","validationCode":"const head = await axios.head(COMPOSE_URL)\nif (head.status >= 300) throw new Error(`Compose file unavailable: ${head.status}`)","typeGuard":null,"tryCatchPattern":"try {\n  await downloadFile(COMPOSE_URL, \"./docker-compose.yaml\")\n} catch (err) {\n  if ((err as Error).message.startsWith(\"Unable to retrieve docker-compose file\")) {\n    // inspect status in message; check network/proxy, then retry or use a vendored compose file\n  } else throw err\n}","preventionTips":["Pre-check the compose URL with curl/HEAD before scripted downloads","Ensure proxy/VPN allows the host and the URL is current for your CLI version","Keep a vendored copy of docker-compose.yaml for offline environments"],"tags":["network","http","download","docker-compose"],"backgroundTag":"download-failed","analyzedSha":"a81a902e9a8fe55b467d106765f6638f12e35c49","analyzedAt":"2026-08-29T01:03:10.972Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}