zed-industries/zed · error

properties should be an object

Error message

properties should be an object

What it means

Asserts that the "properties" member of an intermediate schema object is itself a JSON object during nested-schema construction in python.rs. It fires when a previously inserted entry has "properties" as a non-object (array, string, or null), which can only happen if the source schema being converted contains an invalid properties value for that node.

Source

Thrown at crates/languages/src/python.rs:2418

                        }
                    }

                    current.insert(part.to_string(), serde_json::Value::Object(schema_entry));
                } else {
                    let next_current = current
                        .entry(part.to_string())
                        .or_insert_with(|| {
                            serde_json::json!({
                                "type": "object",
                                "properties": {}
                            })
                        })
                        .as_object_mut()
                        .expect("should be an object")
                        .entry("properties")
                        .or_insert_with(|| serde_json::json!({}))
                        .as_object_mut()
                        .expect("properties should be an object");

                    current = next_current;
                }
            }
        }

        serde_json::json!({
            "type": "object",
            "properties": root_properties
        })
    }
}

#[cfg(target_os = "macos")]
impl RuffLspAdapter {
    const GITHUB_ASSET_KIND: AssetKind = AssetKind::TarGz;
    const ARCH_SERVER_NAME: &str = "apple-darwin";
}

View on GitHub (pinned to f4178619ac)

Solutions

  1. Validate the incoming schema (properties is an object) before walking it
  2. If properties is not an object, replace it with {} and log a warning about the malformed input
  3. Add a fixture test with a malformed schema to keep the converter from panicking
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at crates/languages/src/python.rs:2418 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/abe470a365714d8e. Report an issue: GitHub.