hasura/graphql-engine · warning
decoding update check response: %w
Error message
decoding update check response: %w
What it means
After a successful HTTP response, getLatestVersion decodes the JSON body into updateCheckResponse. This error means the body was not valid JSON for that shape: truncated output, an HTML error page from a proxy, or a changed response schema.
Source
Thrown at cli/update/update.go:41
Latest *semver.Version `json:"latest"`
PreRelease *semver.Version `json:"prerelease"`
}
func getLatestVersion() (*semver.Version, *semver.Version, error) {
var op errors.Op = "update.getLatestVersion"
res, err := http.Get(updateCheckURL)
if err != nil {
return nil, nil, errors.E(op, fmt.Errorf("update check request: %w", err))
}
defer res.Body.Close()
var response updateCheckResponse
err = json.NewDecoder(res.Body).Decode(&response)
if err != nil {
return nil, nil, errors.E(op, fmt.Errorf("decoding update check response: %w", err))
}
if response.Latest == nil && response.PreRelease == nil {
return nil, nil, errors.E(
op,
fmt.Errorf("expected version info not found at %s", updateCheckURL),
)
}
return response.Latest, response.PreRelease, nil
}
func buildAssetURL(v string) string {
os := runtime.GOOS
arch := runtime.GOARCH
extension := ""
if os == "windows" {View on GitHub (pinned to 724551b9ae)
Solutions
- curl the updateCheckURL from the same environment and inspect the raw body
- If a proxy/WAF is mangling the response, whitelist the update domain or disable update checks
- Treat update-check failures as non-fatal: log and continue with the current version
Example fix
// before
if _, _, err := update.HasUpdate(); err != nil { return err }
// after
if _, _, err := update.HasUpdate(); err != nil {
log.Printf("update check failed (continuing): %v", err)
} Defensive patterns
Strategy: fallback
Try / catch
if _, _, err := update.HasUpdate(); err != nil {
if strings.Contains(err.Error(), "decoding update check response") {
// endpoint served unexpected content; skip update flow
}
} Prevention
- Cache the last known-good update info locally
- Alert on schema changes if you operate the update endpoint
When it happens
Trigger: Calling update.HasUpdate() when the update endpoint returns non-JSON (a captive portal or 403/502 HTML page served by a proxy) or when the response schema changed in a newer server version.
Common situations: Corporate proxies injecting HTML interstitials, CDN/WAF returning error pages, partial responses due to connection resets, or the update service changing its payload format.
Related errors
- update check request: %w
- pulling latest actions codegen files from internet failed: %
- unable to fetch introspection schema: %w
- error in fetching introspection schema: %w
- setting up codegen-assets repo failed (this is required for
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/56edf77890a8157b.
Report an issue: GitHub.