{"record":{"id":"d94775d54f84e7c3","repo":"AdguardTeam/AdGuardHome","slug":"sending-http-request-to-s-w","errorCode":null,"errorMessage":"sending http request to %s: %w","messagePattern":"sending http request to (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"internal/updater/check.go","lineNumber":61,"sourceCode":"\tnow := time.Now()\n\trecheckTime := u.prevCheckTime.Add(versionCheckPeriod)\n\tif !forceRecheck && now.Before(recheckTime) {\n\t\tu.logger.DebugContext(ctx, \"version info recheck is not required yet\")\n\n\t\treturn u.prevCheckResult, u.prevCheckError\n\t}\n\n\tvcu := u.versionCheckURL\n\treq, err := http.NewRequestWithContext(ctx, http.MethodGet, vcu, nil)\n\tif err != nil {\n\t\treturn VersionInfo{}, fmt.Errorf(\"constructing request to %s: %w\", vcu, err)\n\t}\n\n\tu.logger.DebugContext(ctx, \"requesting version data\", \"url\", vcu)\n\n\tresp, err := u.client.Do(req)\n\tif err != nil {\n\t\treturn VersionInfo{}, fmt.Errorf(\"sending http request to %s: %w\", vcu, err)\n\t}\n\tdefer func() { err = errors.WithDeferred(err, resp.Body.Close()) }()\n\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn VersionInfo{}, fmt.Errorf(\n\t\t\t\"got status code %d, want %d\",\n\t\t\tresp.StatusCode,\n\t\t\thttp.StatusOK,\n\t\t)\n\t}\n\n\tr := ioutil.LimitReader(resp.Body, maxVersionRespSize.Bytes())\n\n\t// This use of ReadAll is safe, because we just limited the appropriate\n\t// ReadCloser.\n\tbody, err := io.ReadAll(r)\n\tif err != nil {\n\t\treturn VersionInfo{}, fmt.Errorf(\"reading response from %s: %w\", vcu, err)","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/AdguardTeam/AdGuardHome/blob/b41aefbe51c8dde65e2c50f093996afa0502edf9/internal/updater/check.go#L43-L79","documentation":"VersionInfo's HTTP GET to the version-check URL failed at the transport level (DNS, connection, TLS, timeout); the URL is included.","triggerScenarios":"Calling VersionInfo with no network access, DNS failure for the update host, TLS certificate problems, or a cancelled/expired context.","commonSituations":"Offline/air-gapped machines, firewalls blocking the update server, proxy misconfiguration, or short timeouts on slow links.","solutions":["Verify network/DNS reachability of the URL (curl it)","Configure proxy/trust settings or disable update checks in air-gapped deployments","Increase the client timeout if the endpoint is slow"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if _, err := net.LookupHost(host(checkURL)); err != nil { return fmt.Errorf(\"no DNS for update host\") }","typeGuard":null,"tryCatchPattern":"var info VersionInfo\nfor i := 0; i < 3; i++ { info, err = u.VersionInfo(ctx); if err == nil || !isTransient(err) { break }; time.Sleep(backoff(i)) }","preventionTips":["Disable update checks in air-gapped setups","Configure proxies explicitly","Set sane timeouts"],"tags":["updater","http","network"],"backgroundTag":"http-request-failed","analyzedSha":"b41aefbe51c8dde65e2c50f093996afa0502edf9","analyzedAt":"2026-08-27T04:57:55.097Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}