{"record":{"id":"870d11179ab6f0fe","repo":"goreleaser/goreleaser","slug":"could-not-read-response-from-opencollective-w","errorCode":null,"errorMessage":"could not read response from opencollective: %w","messagePattern":"could not read response from opencollective: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/pipe/opencollective/opencollective.go","lineNumber":210,"sourceCode":"\t}\n\n\treturn retryx.DoWithData(ctx, ctx.Config.Retry, func() ([]byte, error) {\n\t\treq, err := http.NewRequestWithContext(ctx, http.MethodPost, c.endpoint, bytes.NewReader(p))\n\t\tif err != nil {\n\t\t\treturn nil, retryx.Unrecoverable(fmt.Errorf(\"could not create request: %w\", err))\n\t\t}\n\t\treq.Header.Set(\"Personal-Token\", c.token)\n\t\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t\tresp, err := http.DefaultClient.Do(req)\n\t\tif err != nil {\n\t\t\treturn nil, retryx.HTTP(fmt.Errorf(\"could not send request to opencollective: %w\", err), resp)\n\t\t}\n\t\tdefer resp.Body.Close()\n\n\t\tbody, err := io.ReadAll(resp.Body)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"could not read response from opencollective: %w\", err)\n\t\t}\n\n\t\tif resp.StatusCode != http.StatusOK {\n\t\t\treturn nil, retryx.HTTP(fmt.Errorf(\"incorrect response from opencollective: %s — %s\", resp.Status, string(body)), resp)\n\t\t}\n\n\t\treturn body, nil\n\t}, retryx.IsRetriable)\n}\n","sourceCodeStart":192,"sourceCodeEnd":220,"githubUrl":"https://github.com/goreleaser/goreleaser/blob/f5edd7395693c0c6b501dc722d445d2e86af854d/internal/pipe/opencollective/opencollective.go#L192-L220","documentation":"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.","triggerScenarios":"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.","commonSituations":"Unstable network cutting the response mid-transfer; server closing connections abruptly under load; proxy/VPN interference with long-lived responses; CI runner network flakiness.","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"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// measure connection stability before release\ncurl -s -m 10 https://api.opencollective.com/graphql/v2 -H 'Content-Type: application/json' -d '{\"query\":\"{ me { id } }\"}'","typeGuard":null,"tryCatchPattern":"if err := do(...); err != nil {\n    if strings.Contains(err.Error(), \"could not read response from opencollective\") {\n        // body read interrupted: backoff and retry\n    }\n    return err\n}","preventionTips":["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"],"tags":["network","http","io"],"backgroundTag":"response-body-read-failed","analyzedSha":"f5edd7395693c0c6b501dc722d445d2e86af854d","analyzedAt":"2026-09-05T09:57:18.807Z","contentChangedAt":"2026-09-05T09:57:18.807Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}