chenhg5/cc-connect · error
download returned HTTP %d
Error message
download returned HTTP %d
What it means
downloadToTemp received a non-200 HTTP status from the update server (404 for missing release asset, 403 rate-limited, 5xx server error). The update is aborted; the status code identifies why the release asset could not be fetched.
Source
Thrown at cmd/cc-connect/update.go:408
func downloadToTemp(url string) (string, error) {
client := &http.Client{
Timeout: 5 * time.Minute,
CheckRedirect: func(req *http.Request, via []*http.Request) error {
if len(via) >= 10 {
return fmt.Errorf("too many redirects")
}
return nil
},
}
resp, err := client.Get(url)
if err != nil {
return "", fmt.Errorf("download: %w", err)
}
defer resp.Body.Close()
if resp.StatusCode != 200 {
return "", fmt.Errorf("download returned HTTP %d", resp.StatusCode)
}
tmp, err := os.CreateTemp("", "cc-connect-update-*")
if err != nil {
return "", err
}
size, err := io.Copy(tmp, resp.Body)
if err != nil {
tmp.Close()
os.Remove(tmp.Name())
return "", fmt.Errorf("write: %w", err)
}
tmp.Close()
fmt.Printf("Downloaded %.1f MB\n", float64(size)/1024/1024)
return tmp.Name(), nil
}View on GitHub (pinned to 4000b2338a)
Solutions
- For 404: the release asset name may have changed — update cc-connect
- For 403/429: GitHub rate limit — wait and retry
- Check the releases page to confirm the asset exists
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at cmd/cc-connect/update.go:408 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/e4374a4d3a312e4d.
Report an issue: GitHub.