{"record":{"id":"547df085d0d6f7c8","repo":"anomalyco/sst","slug":"bad-status-s","errorCode":null,"errorMessage":"bad status: %s","messagePattern":"bad status: (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/global/bun.go","lineNumber":115,"sourceCode":"\t\t\tfilename = \"bun-windows-x64.zip\"\n\t\t}\n\tdefault:\n\t}\n\tif filename == \"\" {\n\t\treturn fmt.Errorf(\"unsupported platform: %s %s\", goos, arch)\n\t}\n\tslog.Info(\"bun selected\", \"filename\", filename)\n\n\t_, err := task.Run(ctx, func() (any, error) {\n\t\turl := \"https://github.com/oven-sh/bun/releases/download/bun-v\" + BUN_VERSION + \"/\" + filename\n\t\tslog.Info(\"bun downloading\", \"url\", url)\n\t\tresponse, err := http.Get(url)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdefer response.Body.Close()\n\t\tif response.StatusCode != http.StatusOK {\n\t\t\treturn nil, fmt.Errorf(\"bad status: %s\", response.Status)\n\t\t}\n\t\tbodyBytes, err := io.ReadAll(response.Body)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treaderAt := bytes.NewReader(bodyBytes)\n\t\tzipReader, err := zip.NewReader(readerAt, readerAt.Size())\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfor _, file := range zipReader.File {\n\t\t\tfilename := filepath.Base(file.Name)\n\t\t\tif filename == \"bun\" || filename == \"bun.exe\" {\n\t\t\t\tf, err := file.Open()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tdefer f.Close()","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/anomalyco/sst/blob/a0bd20f762883e72a35caccb4896c42ce5b3f707/pkg/global/bun.go#L97-L133","documentation":"Inside InstallBun's download task, after http.Get to the bun release URL, any status other than 200 is surfaced as 'bad status: <code and text>'. It means the GitHub release asset could not be fetched as expected.","triggerScenarios":"http.Get to https://github.com/oven-sh/bun/releases/download/bun-v<ver>/<file> returning 404 (bad BUN_VERSION or filename), 403 (rate limited), 5xx, or a proxy error page.","commonSituations":"Corporate proxy/firewall intercepting github.com; GitHub rate limiting shared CI IPs; pinned BUN_VERSION whose release assets were removed; DNS hijack captive portals returning HTML with 200? (no — those hit 403/502 typically); offline environments.","solutions":["Check network access to github.com and the exact URL in a browser/curl","Retry later if rate-limited (403) or set GITHUB token-aware download","Update or pin BUN_VERSION to an existing release","Configure HTTPS_PROXY to a working egress proxy"],"exampleFix":"// before\n$ curl -I https://github.com/oven-sh/bun/releases/download/bun-v9.9.9/bun-linux-x64.zip\n404 Not Found\n// after\n// use an existing version\nconst BUN_VERSION = \"1.1.29\" // valid release tag","handlingStrategy":"retry","validationCode":"resp, err := http.Head(url)\nif err != nil || resp.StatusCode != http.StatusOK {\n    return fmt.Errorf(\"download URL unavailable: %s\", url)\n}\nresp.Body.Close()","typeGuard":null,"tryCatchPattern":"response, err := http.Get(url)\nif err != nil {\n    return err\n}\ndefer response.Body.Close()\nif response.StatusCode != http.StatusOK {\n    return fmt.Errorf(\"bun download failed (%s); check network/proxy or version\", response.Status)\n}","preventionTips":["Verify the release URL with curl before/inside CI","Configure HTTPS_PROXY for restricted networks and retry on 403/5xx with backoff","Pin BUN_VERSION to a release you have confirmed exists"],"tags":["network","http","download","bun"],"backgroundTag":"http-request-failed","analyzedSha":"a0bd20f762883e72a35caccb4896c42ce5b3f707","analyzedAt":"2026-08-30T11:26:00.383Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}