{"record":{"id":"f047078303127af4","repo":"zed-industries/zed","slug":"failed-to-deserialize-metadata","errorCode":null,"errorMessage":"Failed to deserialize metadata","messagePattern":"Failed to deserialize metadata","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/docs_preprocessor/src/main.rs","lineNumber":779,"sourceCode":"                if ignore_list.contains(&&*entry.file_name().to_string_lossy()) {\n                    zlog::info!(logger => \"Ignoring {}\", entry.path().to_string_lossy());\n                } else {\n                    files.push(entry.path());\n                }\n            }\n        }\n    }\n\n    zlog::info!(logger => \"Processing {} `.html` files\", files.len());\n    let pages = docs_pages(&ctx.book)?;\n    write_ai_discovery_artifacts(&pages, &root_dir, &site_url)?;\n    let meta_regex = Regex::new(&FRONT_MATTER_COMMENT.replace(\"{}\", \"(.*)\")).unwrap();\n    for file in &files {\n        let contents = std::fs::read_to_string(&file)?;\n        let mut meta_description = None;\n        let mut meta_title = None;\n        let contents = meta_regex.replace(&contents, |caps: &regex::Captures| {\n            let metadata: HashMap<String, String> = serde_json::from_str(&caps[1]).with_context(|| format!(\"JSON Metadata: {:?}\", &caps[1])).expect(\"Failed to deserialize metadata\");\n            for (kind, content) in metadata {\n                match kind.as_str() {\n                    \"description\" => {\n                        meta_description = Some(content);\n                    }\n                    \"title\" => {\n                        meta_title = Some(content);\n                    }\n                    _ => {\n                        zlog::warn!(logger => \"Unrecognized frontmatter key: {} in {:?}\", kind, pretty_path(&file, &root_dir));\n                    }\n                }\n            }\n            String::new()\n        });\n        let meta_description = meta_description.as_ref().unwrap_or_else(|| {\n            zlog::warn!(logger => \"No meta description found for {:?}\", pretty_path(&file, &root_dir));\n            &default_description","sourceCodeStart":761,"sourceCodeEnd":797,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/docs_preprocessor/src/main.rs#L761-L797","documentation":"Panics in handle_postprocessing while scanning built `.html` files when a page's ZED_META front-matter comment cannot be deserialized into the metadata struct — usually malformed or hand-edited front matter in a docs page.","triggerScenarios":"Thrown at crates/docs_preprocessor/src/main.rs:779 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the ZED_META JSON comment in the offending generated page source","Regenerate the page from its markdown source rather than editing HTML directly","Check the front-matter schema for newly added/renamed fields"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}