{"record":{"id":"30feb69932fc53ae","repo":"goreleaser/goreleaser","slug":"incorrect-response-from-opencollective-s-s","errorCode":null,"errorMessage":"incorrect response from opencollective: %s — %s","messagePattern":"incorrect response from opencollective: (.+?) — (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/pipe/opencollective/opencollective.go","lineNumber":214,"sourceCode":"\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":196,"sourceCodeEnd":220,"githubUrl":"https://github.com/goreleaser/goreleaser/blob/f5edd7395693c0c6b501dc722d445d2e86af854d/internal/pipe/opencollective/opencollective.go#L196-L220","documentation":"GoReleaser's OpenCollective pipe posts a GraphQL mutation to the OpenCollective API. When the HTTP response status is anything other than 200 OK, it wraps the status line and the response body into this error via retryx.HTTP, meaning it is classified as a retriable HTTP failure and will be retried per the configured retry policy before finally failing the publish step.","triggerScenarios":"The doMutation call in internal/pipe/opencollective/opencollective.go:214 receives a non-200 status from the OpenCollective GraphQL endpoint — e.g. an invalid/expired Personal-Token (401/403), a malformed GraphQL mutation (400), rate limiting (429), or OpenCollective server errors (5xx). The raw API error body is embedded after the em dash.","commonSituations":"Expired or wrong opencollective personal token in the environment; the configured collective/project name does not exist so the GraphQL resolver errors; OpenCollective API outage or rate limit during a release; network proxy returning HTML error pages.","solutions":["Read the body after the em dash in the error message — it contains the exact OpenCollective API error (e.g. authentication required, unknown collective).","Verify the Personal-Token is valid and not expired: curl -H 'Personal-Token: $TOKEN' https://api.opencollective.com/graphql/v2 with a {me { id }} query.","Check that the configured open_collective project/collective slug in .goreleaser.yaml matches an existing collective.","If it's a 429/5xx transient error, re-run the release or tune the retry configuration (ctx.Config.Retry)."],"exampleFix":"// before: failing config with bad token\n# GORELEASER_OPENCOLLECTIVE_TOKEN=old-expired-token\n// after: refresh token from https://opencollective.com/administrated-collectives\nexport GORELEASER_OPENCOLLECTIVE_TOKEN=<new-personal-token>","handlingStrategy":"retry","validationCode":"// pre-flight token check\ntoken := os.Getenv(\"GORELEASER_OPENCOLLECTIVE_TOKEN\")\nif token == \"\" {\n    return errors.New(\"GORELEASER_OPENCOLLECTIVE_TOKEN is not set\")\n}\nreq, _ := http.NewRequest(\"POST\", \"https://api.opencollective.com/graphql/v2\",\n    strings.NewReader(`{\"query\":\"{ me { id } }\"}`))\nreq.Header.Set(\"Personal-Token\", token)\nresp, err := http.DefaultClient.Do(req)\nif err != nil || resp.StatusCode != http.StatusOK {\n    return fmt.Errorf(\"opencollective token check failed: status %d\", resp.StatusCode)\n}","typeGuard":null,"tryCatchPattern":"// the pipe already retries via retryx; wrap the run and inspect the status embedded in the message\nif err := goreleaserRun(); err != nil {\n    var httpErr interface{ StatusCode() int }\n    if strings.Contains(err.Error(), \"incorrect response from opencollective\") {\n        log.Printf(\"OpenCollective API rejected request (likely retriable): %v\", err)\n        // re-run after checking token validity\n    }\n}","preventionTips":["Validate the Personal-Token with a { me { id } } query before each release.","Pin and monitor the OpenCollective API status; schedule releases outside known maintenance windows.","Configure retry.attempts in .goreleaser.yaml for transient 429/5xx responses.","Keep the collective slug in .goreleaser.yaml in sync with the actual collective name."],"tags":["http","opencollective","api","network"],"backgroundTag":"http-non-2xx-response","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"}