{"record":{"id":"18df2bb224b5aa89","repo":"router-for-me/CLIProxyAPI","slug":"download-s-w","errorCode":null,"errorMessage":"download %s: %w","messagePattern":"download (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/pluginstore/install.go","lineNumber":123,"sourceCode":"\treleaseVersion, errVersion := ReleaseVersion(release)\n\tif errVersion != nil {\n\t\treturn InstallResult{}, errVersion\n\t}\n\tif releaseVersion != version {\n\t\treturn InstallResult{}, fmt.Errorf(\"release tag %q resolved version %q, want %q\", releaseTag, releaseVersion, version)\n\t}\n\tplugin.Version = version\n\treturn c.installRelease(ctx, plugin, release, version, options)\n}\n\nfunc (c Client) installRelease(ctx context.Context, plugin Plugin, release Release, version string, options InstallOptions) (InstallResult, error) {\n\tarchiveAsset, checksumAsset, errAssets := SelectReleaseAssets(release, plugin.ID, plugin.Version, options.GOOS, options.GOARCH)\n\tif errAssets != nil {\n\t\treturn InstallResult{}, errAssets\n\t}\n\tarchiveData, errArchive := c.DownloadAsset(ctx, archiveAsset)\n\tif errArchive != nil {\n\t\treturn InstallResult{}, fmt.Errorf(\"download %s: %w\", archiveAsset.Name, errArchive)\n\t}\n\tchecksumData, errChecksum := c.DownloadAsset(ctx, checksumAsset)\n\tif errChecksum != nil {\n\t\treturn InstallResult{}, fmt.Errorf(\"download checksums.txt: %w\", errChecksum)\n\t}\n\tchecksums, errParse := ParseChecksums(checksumData)\n\tif errParse != nil {\n\t\treturn InstallResult{}, errParse\n\t}\n\tif errVerify := VerifyChecksum(archiveAsset.Name, archiveData, checksums); errVerify != nil {\n\t\treturn InstallResult{}, errVerify\n\t}\n\tplugin.Version = version\n\tresult, errInstall := InstallArchive(archiveData, plugin, options)\n\tif errInstall != nil {\n\t\treturn InstallResult{}, errInstall\n\t}\n\tresult.InstallType = InstallTypeGitHubRelease","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/pluginstore/install.go#L105-L141","documentation":"During installRelease, downloading the platform archive asset (DownloadAsset on the archive ReleaseAsset) failed; the error names the asset filename and wraps the underlying cause (network failure, HTTP status, size cap). This is the archive half of the two-download install flow (archive + checksums.txt).","triggerScenarios":"InstallVersion/InstallFromManifest when the archive asset download errors: network drop, 404 after the release listing (asset deleted), rate limit, or response exceeding the size cap.","commonSituations":"GitHub rate limiting unauthenticated CI installs; asset removed after listing was cached; flaky network during a large download.","solutions":["Retry the install — asset download failures are frequently transient","Check GitHub API rate limits and add a token if installing frequently in CI","Verify the asset still exists on the release page (it may have been deleted/replaced)","Fix the underlying network condition named by the wrapped error"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if archiveAsset.Size > 0 && archiveAsset.Size > yourBudget {\n    return fmt.Errorf(\"archive %s too large (%d bytes)\", archiveAsset.Name, archiveAsset.Size)\n}","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"download \") {\n    // classify wrapped cause: network -> retry with backoff; 404/rate-limit -> fix auth or asset\n}","preventionTips":["Retry asset downloads with exponential backoff","Authenticate GitHub requests in CI to avoid rate limits","Check asset existence/size from the release listing before downloading"],"tags":["network","download","install","release-assets","go"],"backgroundTag":null,"analyzedSha":"78f0c4079e3e6273d65d03b5549cffc898703264","analyzedAt":"2026-08-15T12:26:37.444Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}