zed-industries/zed · error
Action schema should serialize
Error message
Action schema should serialize
What it means
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.
Source
Thrown at crates/json_schema_store/src/json_schema_store.rs:213
"action" => {
let normalized_action_name = match rest {
Some(name) => name,
None => return None,
};
let action_name = denormalize_action_name(normalized_action_name);
if let Some(cached) = ACTION_SCHEMA_CACHE.read().get(&action_name).cloned() {
return Some(cached);
}
let mut generator = settings::KeymapFile::action_schema_generator();
let schema =
settings::KeymapFile::get_action_schema_by_name(&action_name, &mut generator);
let json = serde_json::to_string(
&root_schema_from_action_schema(schema, &mut generator).to_value(),
)
.expect("Action schema should serialize");
ACTION_SCHEMA_CACHE
.write()
.insert(action_name, json.clone());
Some(json)
}
_ => None,
}
}
async fn resolve_dynamic_schema(
lsp_store: Entity<LspStore>,
path: &str,
cx: &mut AsyncApp,
) -> Result<serde_json::Value> {
let languages = lsp_store.read_with(cx, |lsp_store, _| lsp_store.languages.clone());
let (schema_name, rest) = path.split_once('/').unzip();View on GitHub (pinned to f4178619ac)
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/json_schema_store/src/json_schema_store.rs:213 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/0ab329f448f02ad8.
Report an issue: GitHub.