{"record":{"id":"aa904f37f2024b0d","repo":"ipfs/kubo","slug":"downloading-asset-w","errorCode":null,"errorMessage":"downloading asset: %w","messagePattern":"downloading asset: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/commands/update_github.go","lineNumber":220,"sourceCode":"\t}\n\n\treturn nil, nil, fmt.Errorf(\n\t\t\"release %s exists but has no binary for %s/%s yet; build artifacts may still be uploading, try again in a few hours\",\n\t\ttag, runtime.GOOS, runtime.GOARCH)\n}\n\n// downloadAsset downloads a release asset by its browser_download_url.\n// This hits GitHub's CDN directly, not the API, so no auth headers are needed.\nfunc downloadAsset(ctx context.Context, url string) ([]byte, error) {\n\treq, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treq.Header.Set(\"User-Agent\", \"kubo/\"+version.CurrentVersionNumber)\n\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"downloading asset: %w\", err)\n\t}\n\tdefer resp.Body.Close()\n\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn nil, fmt.Errorf(\"download returned HTTP %d\", resp.StatusCode)\n\t}\n\n\tdata, err := io.ReadAll(io.LimitReader(resp.Body, maxDownloadSize+1))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"reading download: %w\", err)\n\t}\n\tif int64(len(data)) > maxDownloadSize {\n\t\treturn nil, fmt.Errorf(\"download exceeds maximum size of %d bytes\", maxDownloadSize)\n\t}\n\treturn data, nil\n}\n\n// downloadAndVerifySHA512 downloads the .sha512 sidecar file for the given","sourceCodeStart":202,"sourceCodeEnd":238,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/commands/update_github.go#L202-L238","documentation":"Fired by downloadAsset when the HTTP GET of a release asset's browser_download_url (GitHub CDN) fails at the request-construction or transport stage. It wraps the underlying error during the kubo self-update binary download; no auth headers are involved since the CDN URL is public.","triggerScenarios":"Thrown at core/commands/update_github.go:220 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the update; CDN or connectivity hiccups are the usual cause","Check proxy/firewall settings for large binary downloads","Fall back to a manual download from the release page"],"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"}