zed-industries/zed · error · anyhow::Error
{error}
Error message
{error} What it means
ToolchainStore resolves toolchains (prebuilt language servers/runtimes) via the ResolveToolchain RPC to the Zed server. A successful RPC returns either Response::Toolchain or Response::Error; in the Error case the server's message is re-thrown verbatim as {error} (crates/project/src/toolchain_store.rs:774). This is a passthrough - the real cause is whatever the server put in the error payload.
Source
Thrown at crates/project/src/toolchain_store.rs:774
language_name: language_name.clone().into(),
abs_path: abs_path.to_string_lossy().into_owned(),
})
.await?;
let response = response
.response
.context("Failed to resolve toolchain via RPC")?;
use proto::resolve_toolchain_response::Response;
match response {
Response::Toolchain(toolchain) => Ok(Toolchain {
language_name: language_name.clone(),
name: toolchain.name.into(),
path: toolchain.path.into(),
as_json: serde_json::Value::from_str(&toolchain.raw_json)
.context("Deserializing ResolveToolchain LSP response")?,
}),
Response::Error(error) => {
anyhow::bail!("{error}");
}
}
})
}
}
View on GitHub (pinned to f4178619ac)
Solutions
- Read the message body - it is the server's own error text and names the concrete cause
- Check the language's toolchain/language-server settings in settings.json and prefer an explicit local installation
- Update Zed and reconnect - newer servers publish more toolchains
- If a local toolchain exists, point the language server config at its path instead of relying on RPC resolution
Defensive patterns
Strategy: try-catch
Try / catch
match toolchain_store.resolve_toolchain(language_name, cx).await {
Ok(toolchain) => toolchain,
Err(e) => {
log::error!("toolchain resolution failed for {language_name}: {e:#}");
// fall back to a system-installed language server if one is configured
system_toolchain_or_none(language_name)
}
} Prevention
- Pin toolchains that are actually published for your platform
- Cache resolved toolchains instead of resolving on every request
- Log the passthrough message verbatim - the server text is the diagnosis
When it happens
Trigger: Requesting a toolchain for a language whose server-side resolution fails: unknown language, no toolchain published for the client platform, or a server-side download/configuration error.
Common situations: Remote/dev-server environments; newly supported or experimental languages whose toolchain is not published yet; platforms without a prebuilt toolchain.
Related errors
- failed to send message: {error}
- build ids may only contain lowercase letters, numbers, '.',
- archive links are not supported: {member.name}
- registry dataset requires a name
- origin/main tip {main_sha[:12]} unavailable locally after fe
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/39a2da92a2a001dc.
Report an issue: GitHub.