tinyhumansai/openhuman · error · anyhow::Error

Missing 'by' for find

Error message

Missing 'by' for find

What it means

Action-argument validation in parse_browser_action: the `find` action was requested but its required `by` argument (the lookup strategy, e.g. css/xpath/text) is absent or not a string. Fires before any browser automation runs; the companion guard checks `value`.

Source

Thrown at src/openhuman/tools/impl/browser/action_parser.rs:130

                    .and_then(serde_json::Value::as_u64)
                    .map(|p| u32::try_from(p).unwrap_or(u32::MAX)),
            })
        }
        "is_visible" => {
            let selector = args
                .get("selector")
                .and_then(|v| v.as_str())
                .ok_or_else(|| anyhow::anyhow!("Missing 'selector' for is_visible"))?;
            Ok(BrowserAction::IsVisible {
                selector: selector.into(),
            })
        }
        "close" => Ok(BrowserAction::Close),
        "find" => {
            let by = args
                .get("by")
                .and_then(|v| v.as_str())
                .ok_or_else(|| anyhow::anyhow!("Missing 'by' for find"))?;
            let value = args
                .get("value")
                .and_then(|v| v.as_str())
                .ok_or_else(|| anyhow::anyhow!("Missing 'value' for find"))?;
            let action = args
                .get("find_action")
                .and_then(|v| v.as_str())
                .ok_or_else(|| anyhow::anyhow!("Missing 'find_action' for find"))?;
            Ok(BrowserAction::Find {
                by: by.into(),
                value: value.into(),
                action: action.into(),
                fill_value: args
                    .get("fill_value")
                    .and_then(|v| v.as_str())
                    .map(String::from),
            })
        }

View on GitHub (pinned to 7491200858)

Solutions

  1. Include `by` as a string naming the locator strategy
  2. Also provide `value` and `find_action` in the same call
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/tools/impl/browser/action_parser.rs:130 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/11520d1e127e840d. Report an issue: GitHub.