tinyhumansai/openhuman · error · anyhow::Error

Missing required parameter: symbol

Error message

Missing required parameter: symbol

What it means

Required-parameter guard in the stock-price tool's execute: `symbol` is missing, non-string, or trims to empty (the .filter(!is_empty) chain means blank strings also land here). Fires before any market-data request; the caller must supply a ticker such as AAPL or SPY.

Source

Thrown at src/openhuman/integrations/tools/stock_prices.rs:178

        json!({
            "type": "object",
            "properties": {
                "symbol": {
                    "type": "string",
                    "description": "Stock or index ticker, e.g. AAPL, MSFT, SPY"
                }
            },
            "required": ["symbol"]
        })
    }

    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
        let symbol = args
            .get("symbol")
            .and_then(|v| v.as_str())
            .map(str::trim)
            .filter(|s| !s.is_empty())
            .ok_or_else(|| anyhow::anyhow!("Missing required parameter: symbol"))?;

        tracing::info!("[stock_quote] symbol={}", symbol);

        let body = json!({ "symbol": symbol });
        match self.client.post::<QuoteResponse>(PATH_QUOTE, &body).await {
            Ok(resp) => {
                let q = &resp.quote;
                let mut out = format!(
                    "{} — ${:.4}\n  open ${:.4}  high ${:.4}  low ${:.4}\n  prev close ${:.4}  change {:+.4} ({})\n  volume {}",
                    q.symbol,
                    q.price,
                    q.open,
                    q.high,
                    q.low,
                    q.previous_close,
                    q.change,
                    q.change_percent,
                    q.volume,

View on GitHub (pinned to 7491200858)

Solutions

  1. Supply a non-empty ticker symbol string
  2. Verify the ticker is valid for the quotes provider
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/integrations/tools/stock_prices.rs:178 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/a9008ddac8fc3a84. Report an issue: GitHub.