goreleaser/goreleaser · error
could not read response from opencollective: %w
Error message
could not read response from opencollective: %w
What it means
After a successful HTTP round-trip, reading the response body with io.ReadAll failed. The client returns 'could not read response from opencollective: %w', aborting the mutation since the GraphQL result is unavailable.
Source
Thrown at internal/pipe/opencollective/opencollective.go:210
}
return retryx.DoWithData(ctx, ctx.Config.Retry, func() ([]byte, error) {
req, err := http.NewRequestWithContext(ctx, http.MethodPost, c.endpoint, bytes.NewReader(p))
if err != nil {
return nil, retryx.Unrecoverable(fmt.Errorf("could not create request: %w", err))
}
req.Header.Set("Personal-Token", c.token)
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
return nil, retryx.HTTP(fmt.Errorf("could not send request to opencollective: %w", err), resp)
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
return nil, fmt.Errorf("could not read response from opencollective: %w", err)
}
if resp.StatusCode != http.StatusOK {
return nil, retryx.HTTP(fmt.Errorf("incorrect response from opencollective: %s — %s", resp.Status, string(body)), resp)
}
return body, nil
}, retryx.IsRetriable)
}
View on GitHub (pinned to f5edd73956)
Solutions
- Re-run the release — the underlying cause is usually transient network interruption
- Check network stability of the CI runner (VPN, proxy, MTU issues)
- Retry on a different network/runner if it reproduces consistently
- Compare with direct curl to the endpoint to rule out local network problems
Defensive patterns
Strategy: retry
Validate before calling
// measure connection stability before release
curl -s -m 10 https://api.opencollective.com/graphql/v2 -H 'Content-Type: application/json' -d '{"query":"{ me { id } }"}' Try / catch
if err := do(...); err != nil {
if strings.Contains(err.Error(), "could not read response from opencollective") {
// body read interrupted: backoff and retry
}
return err
} Prevention
- Retry on partial-read failures; they are usually transient
- Investigate MTU/VPN issues if reads consistently truncate
- Avoid flaky networks for release jobs; prefer wired/stable runners
- Keep HTTP client timeouts generous enough for slow GraphQL responses
When it happens
Trigger: io.ReadAll(resp.Body) errors inside the retry closure — the connection was reset mid-response, chunked encoding broke, or the body reader hit an I/O error.
Common situations: Unstable network cutting the response mid-transfer; server closing connections abruptly under load; proxy/VPN interference with long-lived responses; CI runner network flakiness.
Related errors
- bucket or provider cannot be empty
- got status code %d: %s
- could not POST /v2/shares: %w
- could not read from body: %w
- could not read response: %w
AI-assisted analysis of goreleaser/goreleaser@f5edd73956 (2026-09-05).
Data as JSON: /api/errors/870d11179ab6f0fe.
Report an issue: GitHub.