{"record":{"id":"eedd922bccb6dcc2","repo":"glanceapp/glance","slug":"failed-to-retrieve-any-content","errorCode":null,"errorMessage":"failed to retrieve any content","messagePattern":"failed to retrieve any content","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/glance/widget-utils.go","lineNumber":20,"sourceCode":"\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"encoding/json\"\n\t\"encoding/xml\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math/rand/v2\"\n\t\"net/http\"\n\t\"strconv\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n)\n\nvar (\n\terrNoContent      = errors.New(\"failed to retrieve any content\")\n\terrPartialContent = errors.New(\"failed to retrieve some of the content\")\n)\n\nconst defaultClientTimeout = 5 * time.Second\n\nvar defaultHTTPClient = &http.Client{\n\tTransport: &http.Transport{\n\t\tMaxIdleConnsPerHost: 10,\n\t\tProxy:               http.ProxyFromEnvironment,\n\t},\n\tTimeout: defaultClientTimeout,\n}\n\nvar defaultInsecureHTTPClient = &http.Client{\n\tTimeout: defaultClientTimeout,\n\tTransport: &http.Transport{\n\t\tTLSClientConfig: &tls.Config{InsecureSkipVerify: true},\n\t\tProxy:           http.ProxyFromEnvironment,","sourceCodeStart":2,"sourceCodeEnd":38,"githubUrl":"https://github.com/glanceapp/glance/blob/91324e8de762702e97b0ac5c8e36271d644d8642/internal/glance/widget-utils.go#L2-L38","documentation":"errNoContent is a sentinel error in internal/glance/widget-utils.go meaning every attempted content fetch returned nothing usable. It is returned by the multi-source fetch helpers (e.g. fetchBytesAndString / concurrent request helpers) when all requests failed or all responses were empty, as opposed to errPartialContent when only some failed. Widgets surface it via withError and schedule an early retry.","triggerScenarios":"A widget's update() calls one of the utils that fans out N requests (documented by its comments as 'fails when no content could be retrieved from any of the provided requests'); every request errors (network down, DNS failure, non-200 status) or every response body is empty, so the helper returns errNoContent.","commonSituations":"Container has no internet or DNS is broken; a site changed its API and every URL 404s; HTTP_PROXY/HTTPS_PROXY env vars (defaultHTTPClient uses http.ProxyFromEnvironment) point to a dead proxy; target site rate-limits or blocks the server IP; 5s defaultClientTimeout exceeded on slow links.","solutions":["Verify outbound network/DNS from the Glance host (curl the failing widget's target URL).","Check HTTP_PROXY/HTTPS_PROXY/NO_PROXY environment variables; defaultHTTPClient honors them, a bad proxy makes every request fail.","Confirm the target service is up and the server IP is not blocked or rate-limited.","Increase network throughput or move Glance closer to the target (the 5s default client timeout can be exceeded on slow links).","Look at the widget's error badge in the UI; combined with logs it identifies which upstream returned nothing."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ensure the Glance host has working DNS and outbound HTTP before deploy.","Set HTTP_PROXY/HTTPS_PROXY/NO_PROXY correctly — the default client honors them.","Prefer widgets whose upstream APIs you can reach from the server's network region."],"tags":["network","http","sentinel-error","widget","proxy"],"backgroundTag":null,"analyzedSha":"91324e8de762702e97b0ac5c8e36271d644d8642","analyzedAt":"2026-08-15T14:12:54.279Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}