jdx/mise · error
{}
Error message
{} What it means
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.
Source
Thrown at src/http.rs:635
cache.entry(key).or_default().clone()
};
// Initialize the cell if needed - concurrent callers will wait
let result = cell
.get_or_init(|| {
let url = url.clone();
async move {
match self.get_text(url).await {
Ok(text) => Ok(text),
Err(err) => Err(err.to_string()),
}
}
})
.await;
match result {
Ok(text) => Ok(text.clone()),
Err(err) => bail!("{}", err),
}
}
pub(crate) async fn get_html<U: IntoUrl>(&self, url: U) -> Result<String> {
let url = url.into_url()?;
let resp = self.get_async(url.clone()).await?;
let is_html = resp
.headers()
.get(CONTENT_TYPE)
.and_then(|content_type| content_type.to_str().ok())
.is_some_and(|content_type| {
content_type
.split_once(';')
.map_or(content_type, |(media_type, _)| media_type)
.trim()
.eq_ignore_ascii_case("text/html")
});
if !is_html {View on GitHub (pinned to 6f52dcdf99)
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.
Example fix
# before: first fetch flakes, every later use of the URL fails in the same run $ mise lock ERROR: error sending request for url (https://.../SHASUMS256.txt) # after: rerun — the error cache is per-process only $ mise lock
Defensive patterns
Strategy: retry
Validate before calling
# cheap preflight before a long mise run curl -fsSI "$url" >/dev/null 2>&1 || echo "unreachable: $url"
Try / catch
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.
Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- remote cache blob pack content length metadata mismatch: exp
- remote cache blob pack blob count metadata mismatch: expecte
- remote cache blob pack payload byte metadata mismatch: expec
- remote cache blob pack has an invalid content type
- remote action manifest ETag does not match its body
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/b9403135a8c3646f.
Report an issue: GitHub.