{"record":{"id":"bc19957d66f21a10","repo":"hasura/graphql-engine","slug":"could-not-find-the-release-asset","errorCode":null,"errorMessage":"could not find the release asset","messagePattern":"could not find the release asset","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/update/update.go","lineNumber":80,"sourceCode":"\n\treturn fmt.Sprintf(\n\t\t\"https://github.com/hasura/graphql-engine/releases/download/v%s/cli-hasura-%s-%s%s\",\n\t\tv, os, arch, extension,\n\t)\n}\n\nfunc downloadAsset(url, fileName, filePath string) (*os.File, error) {\n\tvar op errors.Op = \"update.downloadAsset\"\n\n\tres, err := http.Get(url)\n\tif err != nil {\n\t\treturn nil, errors.E(op, errors.KindNetwork, fmt.Errorf(\"downloading asset: %w\", err))\n\t}\n\tdefer res.Body.Close()\n\n\tif res.StatusCode != http.StatusOK {\n\t\treturn nil, errors.E(op, errors.E(\"could not find the release asset\"))\n\t}\n\n\tasset, err := os.OpenFile(\n\t\tfilepath.Join(filePath, fileName),\n\t\tos.O_CREATE|os.O_WRONLY|os.O_TRUNC,\n\t\t0o755,\n\t)\n\tif err != nil {\n\t\treturn nil, errors.E(op, fmt.Errorf(\"creating new binary file: %w\", err))\n\t}\n\tdefer asset.Close()\n\n\t_, err = io.Copy(asset, res.Body)\n\tif err != nil {\n\t\treturn nil, errors.E(op, fmt.Errorf(\"saving downloaded file: %w\", err))\n\t}\n\n\treturn asset, nil\n}","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/update/update.go#L62-L98","documentation":"downloadAsset got an HTTP response but the status code was not 200, meaning the asset URL resolved at the transport level yet the server did not serve the file - typically 404 for a missing asset for the detected platform, or 403 for rate-limited/blocked release downloads.","triggerScenarios":"Calling ApplyUpdate() when the release for the latest version lacks an asset matching the current OS/architecture (404), or when the release host rate-limits unauthenticated downloads (403).","commonSituations":"A release published without binaries for a niche platform, an incomplete/mirrored release, rate limiting of release downloads in CI, or a stale URL for a deleted release asset.","solutions":["Check the release page for the latest version and confirm an asset exists for your OS/arch","If rate-limited, wait or authenticate; in CI cache or vendor the binary instead of auto-updating","Update the CLI via a package manager or manual download instead of self-update"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"if _, err := downloadAsset(url, name, path); err != nil {\n    if strings.Contains(err.Error(), \"could not find the release asset\") {\n        // direct user to the releases page for manual download\n    }\n}","preventionTips":["Verify platform assets exist on the release before automating updates","Vendor or cache binaries in CI to avoid 404/403 from release hosts"],"tags":["http-404","download","update","hasura-cli"],"backgroundTag":"release-asset-not-found","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}