zed-industries/zed · error
Default description not a string
Error message
Default description not a string
What it means
Raised in handle_postprocessing when the `zed-html` preprocess output's default-description key exists but its value is not a TOML/JSON string (e.g. a table or array). The preprocessor config is malformed at that key and docs postprocessing panics with this message.
Source
Thrown at crates/docs_preprocessor/src/main.rs:710
let zed_html = output.remove("zed-html").expect("zed-html output defined");
let redirects = zed_html
.get("redirect")
.and_then(|redirects| redirects.as_table())
.map(|redirects| {
redirects
.iter()
.filter_map(|(source, destination)| {
destination
.as_str()
.map(|destination| (source.clone(), destination.to_string()))
})
.collect::<Vec<_>>()
});
let default_description = zed_html
.get("default-description")
.expect("Default description not found")
.as_str()
.expect("Default description not a string")
.to_string();
let default_title = zed_html
.get("default-title")
.expect("Default title not found")
.as_str()
.expect("Default title not a string")
.to_string();
let amplitude_key = std::env::var("DOCS_AMPLITUDE_API_KEY").unwrap_or_default();
let consent_io_instance = std::env::var("DOCS_CONSENT_IO_INSTANCE").unwrap_or_default();
let docs_channel = std::env::var("DOCS_CHANNEL").unwrap_or_else(|_| "stable".to_string());
let site_url = std::env::var("MDBOOK_BOOK__SITE_URL")
.ok()
.filter(|site_url| !site_url.trim().is_empty())
.unwrap_or_else(|| {
match docs_channel.as_str() {
"nightly" => "/docs/nightly/",
"preview" => "/docs/preview/",
_ => "/docs/",View on GitHub (pinned to f4178619ac)
Solutions
- Quote the default-description value in book.toml so it parses as a string
- Validate book.toml types against the expected schema
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/docs_preprocessor/src/main.rs:710 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/97d49e77d6392d27.
Report an issue: GitHub.