tinyhumansai/openhuman · error · anyhow::Error

Missing or invalid '{key}' parameter

Error message

Missing or invalid '{key}' parameter

What it means

Generic guard in read_required_i64 for computer-use actions: the named integer parameter ({key}, e.g. coordinate or key-code fields) is absent from params or not representable as i64. Validation of the action's numeric arguments fails before dispatch to the endpoint.

Source

Thrown at src/openhuman/tools/impl/browser/browser.rs:576

            if limit < 0 {
                anyhow::bail!("Configured coordinate limit for '{key}' must be >= 0")
            }
            if value > limit {
                anyhow::bail!("'{key}'={value} exceeds configured limit {limit}")
            }
        }
        Ok(())
    }

    fn read_required_i64(
        &self,
        params: &serde_json::Map<String, Value>,
        key: &str,
    ) -> anyhow::Result<i64> {
        params
            .get(key)
            .and_then(Value::as_i64)
            .ok_or_else(|| anyhow::anyhow!("Missing or invalid '{key}' parameter"))
    }

    fn validate_computer_use_action(
        &self,
        action: &str,
        params: &serde_json::Map<String, Value>,
    ) -> anyhow::Result<()> {
        match action {
            "open" => {
                let url = params
                    .get("url")
                    .and_then(Value::as_str)
                    .ok_or_else(|| anyhow::anyhow!("Missing 'url' for open action"))?;
                self.validate_url(url)?;
            }
            "mouse_move" | "mouse_click" => {
                let x = self.read_required_i64(params, "x")?;
                let y = self.read_required_i64(params, "y")?;

View on GitHub (pinned to 7491200858)

Solutions

  1. Include {key} as an integer in the action params
  2. Ensure the value is a JSON number, not a string
  3. Keep coordinates within configured limits
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/tools/impl/browser/browser.rs:576 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/14b2d38c5293eed3. Report an issue: GitHub.