{"record":{"id":"b9403135a8c3646f","repo":"jdx/mise","slug":"error-b94031","errorCode":null,"errorMessage":"{}","messagePattern":"\\{\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/http.rs","lineNumber":635,"sourceCode":"            cache.entry(key).or_default().clone()\n        };\n\n        // Initialize the cell if needed - concurrent callers will wait\n        let result = cell\n            .get_or_init(|| {\n                let url = url.clone();\n                async move {\n                    match self.get_text(url).await {\n                        Ok(text) => Ok(text),\n                        Err(err) => Err(err.to_string()),\n                    }\n                }\n            })\n            .await;\n\n        match result {\n            Ok(text) => Ok(text.clone()),\n            Err(err) => bail!(\"{}\", err),\n        }\n    }\n\n    pub(crate) async fn get_html<U: IntoUrl>(&self, url: U) -> Result<String> {\n        let url = url.into_url()?;\n        let resp = self.get_async(url.clone()).await?;\n        let is_html = resp\n            .headers()\n            .get(CONTENT_TYPE)\n            .and_then(|content_type| content_type.to_str().ok())\n            .is_some_and(|content_type| {\n                content_type\n                    .split_once(';')\n                    .map_or(content_type, |(media_type, _)| media_type)\n                    .trim()\n                    .eq_ignore_ascii_case(\"text/html\")\n            });\n        if !is_html {","sourceCodeStart":617,"sourceCodeEnd":653,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/http.rs#L617-L653","documentation":"get_text_cached memoizes get_text per URL for the lifetime of the process in a OnceCell (src/http.rs:610-637). The bail at src/http.rs:635 merely re-raises the inner error's Display text after it was stored as a String in the cache. The \"{}\" message is therefore whatever the underlying fetch failed with (DNS, timeout, 404, proxy error) — and because errors are cached per URL, every later call for the same URL in the same process returns the identical failure.","triggerScenarios":"The first get_text(url) inside a mise process fails (offline, DNS failure, TLS/proxy error, 404/4xx) — that call, and every subsequent get_text_cached of the same URL in that process, raises the cached message. Typical during long operations like locking many platforms that repeatedly fetch the same SHASUMS256.txt.","commonSituations":"A transient network blip early in a long mise run poisoning every later use of that URL in the same invocation; a mistyped host in a custom backend's URL; corporate proxies blocking github.com or release CDNs.","solutions":["Read the inner message — it is the real transport/HTTP error; fix that root cause (connectivity, URL, auth, proxy).","Re-run the mise command: the error cache lives only for the current process, so a fresh invocation retries the fetch.","Verify reachability outside mise: curl -fsSL <url> with the same proxy environment.","For GitHub URLs, export GITHUB_TOKEN / MISE_GITHUB_TOKEN to avoid rate-limit failures."],"exampleFix":"# before: first fetch flakes, every later use of the URL fails in the same run\n$ mise lock\nERROR: error sending request for url (https://.../SHASUMS256.txt)\n\n# after: rerun — the error cache is per-process only\n$ mise lock","handlingStrategy":"retry","validationCode":"# cheap preflight before a long mise run\ncurl -fsSI \"$url\" >/dev/null 2>&1 || echo \"unreachable: $url\"","typeGuard":null,"tryCatchPattern":"Parse the inner message for its failure class: dns/timeout/connection -> rerun the mise command (a new process resets the per-URL error cache); 404 or permanent dns failure -> fix the URL, no retry. Never loop inside one process expecting the cached error to change.","preventionTips":["Verify connectivity and proxy env before long lock/install runs.","Set MISE_GITHUB_TOKEN / GITHUB_TOKEN for GitHub-heavy operations.","Prefer stable JSON API URLs over endpoints that flake.","After a network failure, restart the whole mise command rather than expecting in-run recovery."],"tags":["http","network","cache","fetch","retry"],"backgroundTag":"http-request-failed","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","schemaVersion":2},"datasetVersion":"2026-08-23T11:17:13.642Z"}