{"record":{"id":"7274134ea9718205","repo":"oven-sh/bun","slug":"unsupported-cloud-name","errorCode":null,"errorMessage":"Unsupported cloud: ${name}","messagePattern":"Unsupported cloud: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/machine.mjs","lineNumber":1067,"sourceCode":"\n/**\n * @typedef Cloud\n * @property {string} name\n * @property {(options: MachineOptions) => Promise<Machine>} createMachine\n */\n\nfunction getCloud(name) {\n  switch (name) {\n    case \"docker\":\n      return docker;\n    case \"aws\":\n      return aws;\n    case \"azure\":\n      return azure;\n    case \"tart\":\n      return tart;\n  }\n  throw new Error(`Unsupported cloud: ${name}`);\n}\n\n/**\n * @typedef {\"linux\" | \"darwin\" | \"windows\"} Os\n * @typedef {\"aarch64\" | \"x64\"} Arch\n * @typedef {\"macos\" | \"windowsserver\" | \"debian\" | \"ubuntu\" | \"alpine\" | \"amazonlinux\"} Distro\n */\n\n/**\n * @typedef {Object} Platform\n * @property {Os} os\n * @property {Arch} arch\n * @property {Distro} distro\n * @property {string} release\n * @property {string} [eol]\n */\n\n/**","sourceCodeStart":1049,"sourceCodeEnd":1085,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/scripts/machine.mjs#L1049-L1085","documentation":"getCloud(name) maps provider names to implementations: 'docker', 'aws', 'azure', 'tart'. Any other string falls through the switch and throws — a CLI/config typo or an unimplemented provider request, not an infrastructure failure.","triggerScenarios":"Passing --cloud gcp/do/oci or a typo like 'azr' or 'doker'; an empty cloud value reaching the switch; code adding a new provider object without wiring it into getCloud.","commonSituations":"Hand-typed machine CLI invocations; new contributor assuming a provider exists; config defaulting cloud to undefined.","solutions":["Use one of: docker, aws, azure, tart","Check the exact --cloud flag / cloud config key spelling","If you added a provider implementation, also add its case to getCloud in scripts/machine.mjs"],"exampleFix":"// before\nconst provider = getCloud('gcp');\n\n// after\nconst provider = getCloud('aws');","handlingStrategy":"validation","validationCode":"const CLOUDS = new Set(['docker', 'aws', 'azure', 'tart']);\nif (!CLOUDS.has(name)) {\n  throw new Error(`cloud must be one of ${[...CLOUDS].join(', ')}, got: ${name}`);\n}","typeGuard":"const isCloudName = (v) =>\n  v === 'docker' || v === 'aws' || v === 'azure' || v === 'tart';","tryCatchPattern":null,"preventionTips":["Validate the --cloud CLI flag against the known set before dispatching","Make new provider names fail loudly at parse time instead of deep in getCloud","Document the supported provider list next to the CLI flag help"],"tags":["cli","config","validation"],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}