{"record":{"id":"989ed55e90c358ee","repo":"ipfs/kubo","slug":"decoding-github-releases-w","errorCode":null,"errorMessage":"decoding GitHub releases: %w","messagePattern":"decoding GitHub releases: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/commands/update_github.go","lineNumber":155,"sourceCode":"\t// Fetch more than needed so we can filter prereleases and still return count results.\n\tperPage := count\n\tif !includePre {\n\t\tperPage = count * 3\n\t}\n\tif perPage > 100 {\n\t\tperPage = 100\n\t}\n\n\turl := fmt.Sprintf(\"%s?per_page=%d\", githubReleaseBaseURL(), perPage)\n\tresp, err := githubGet(ctx, url)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer resp.Body.Close()\n\n\tvar all []ghRelease\n\tif err := json.NewDecoder(resp.Body).Decode(&all); err != nil {\n\t\treturn nil, fmt.Errorf(\"decoding GitHub releases: %w\", err)\n\t}\n\n\tvar filtered []ghRelease\n\tfor _, r := range all {\n\t\tif !includePre && r.Prerelease {\n\t\t\tcontinue\n\t\t}\n\t\tfiltered = append(filtered, r)\n\t\tif len(filtered) >= count {\n\t\t\tbreak\n\t\t}\n\t}\n\treturn filtered, nil\n}\n\n// githubReleaseByTag fetches a single release by its git tag.\nfunc githubReleaseByTag(ctx context.Context, tag string) (*ghRelease, error) {\n\turl := fmt.Sprintf(\"%s/tags/%s\", githubReleaseBaseURL(), tag)","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/commands/update_github.go#L137-L173","documentation":"'ipfs update' fetched the GitHub releases list but the response body did not decode as a JSON array of releases -- typically an HTML error page, a rate-limit response, or a truncated body rather than the expected API payload.","triggerScenarios":"Thrown at core/commands/update_github.go:155 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry after a while; GitHub API rate limiting is the most common cause","Check network/proxy setup if the error persists","List releases manually at github.com/ipfs/kubo/releases and pin the version explicitly"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}