{"record":{"id":"0ab329f448f02ad8","repo":"zed-industries/zed","slug":"action-schema-should-serialize","errorCode":null,"errorMessage":"Action schema should serialize","messagePattern":"Action schema should serialize","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/json_schema_store/src/json_schema_store.rs","lineNumber":213,"sourceCode":"\n        \"action\" => {\n            let normalized_action_name = match rest {\n                Some(name) => name,\n                None => return None,\n            };\n            let action_name = denormalize_action_name(normalized_action_name);\n\n            if let Some(cached) = ACTION_SCHEMA_CACHE.read().get(&action_name).cloned() {\n                return Some(cached);\n            }\n\n            let mut generator = settings::KeymapFile::action_schema_generator();\n            let schema =\n                settings::KeymapFile::get_action_schema_by_name(&action_name, &mut generator);\n            let json = serde_json::to_string(\n                &root_schema_from_action_schema(schema, &mut generator).to_value(),\n            )\n            .expect(\"Action schema should serialize\");\n\n            ACTION_SCHEMA_CACHE\n                .write()\n                .insert(action_name, json.clone());\n            Some(json)\n        }\n\n        _ => None,\n    }\n}\n\nasync fn resolve_dynamic_schema(\n    lsp_store: Entity<LspStore>,\n    path: &str,\n    cx: &mut AsyncApp,\n) -> Result<serde_json::Value> {\n    let languages = lsp_store.read_with(cx, |lsp_store, _| lsp_store.languages.clone());\n    let (schema_name, rest) = path.split_once('/').unzip();","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/json_schema_store/src/json_schema_store.rs#L195-L231","documentation":"Raised while resolving the JSON schema for a single named action: after cache lookup misses, the keymap action-schema generator is asked to produce the schema for the denormalized action name. Failure means schemars could not build/serialize the schema for that action's bindings — typically an unknown action name or a type whose schema generation errors.","triggerScenarios":"Thrown at crates/json_schema_store/src/json_schema_store.rs:213 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the action name exists and matches a registered Zed action before requesting its schema","Log the failing action name alongside the serialization error to identify the offending type","Guard with an Option-returning helper and cache None for unknown actions to avoid repeated failures"],"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"}