{"record":{"id":"1aa6314ddfa0f73b","repo":"ipfs/kubo","slug":"decoding-github-release-w","errorCode":null,"errorMessage":"decoding GitHub release: %w","messagePattern":"decoding GitHub release: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/commands/update_github.go","lineNumber":182,"sourceCode":"\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)\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 rel ghRelease\n\tif err := json.NewDecoder(resp.Body).Decode(&rel); err != nil {\n\t\treturn nil, fmt.Errorf(\"decoding GitHub release: %w\", err)\n\t}\n\treturn &rel, nil\n}\n\n// findReleaseAsset locates the platform-appropriate asset in a release.\n// It fails immediately with a clear message if:\n//   - the release tag does not exist on GitHub (typo, unreleased version)\n//   - the release exists but has no binary for this OS/arch (CI still building)\nfunc findReleaseAsset(ctx context.Context, tag string) (*ghRelease, *ghAsset, error) {\n\trel, err := githubReleaseByTag(ctx, tag)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"release %s not found on GitHub: %w\", tag, err)\n\t}\n\n\twant := assetNameForPlatformTag(tag)\n\tfor i := range rel.Assets {\n\t\tif rel.Assets[i].Name == want {\n\t\t\treturn rel, &rel.Assets[i], nil","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/commands/update_github.go#L164-L200","documentation":"Fired by githubReleaseByTag when the HTTP response body from the GitHub API release-by-tag endpoint cannot be decoded into the ghRelease struct (malformed JSON, unexpected response shape, or a truncated/error body). It wraps the underlying decode error and aborts the release lookup used by the self-update flow.","triggerScenarios":"Thrown at core/commands/update_github.go:182 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the command; transient API/rate-limit failures are typical","Confirm the tag exists on github.com/ipfs/kubo/releases","Check proxy or captive-portal interference if persistent"],"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"}