tinyhumansai/openhuman · error

Configured coordinate limit for '{key}' must be >= 0

Error message

Configured coordinate limit for '{key}' must be >= 0

What it means

validate_coordinate rejects a configured coordinate limit that is itself negative. This is a config sanity check: a negative limit in the browser coordinate config would make every value fail, so the misconfiguration is reported against the config key rather than the caller.

Source

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

                    allowed_domains: self.allowed_domains.clone(),
                    allow_all: allow_all_browser_domains(),
                }),
            )
            .await
            .context("Playwright browser action failed")?;

        Ok(ToolResult::success(
            serde_json::to_string_pretty(&output).unwrap_or_default(),
        ))
    }

    fn validate_coordinate(&self, key: &str, value: i64, max: Option<i64>) -> anyhow::Result<()> {
        if value < 0 {
            anyhow::bail!("'{key}' must be >= 0")
        }
        if let Some(limit) = max {
            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"))
    }

View on GitHub (pinned to 7491200858)

Solutions

  1. Correct the negative limit in the browser coordinate configuration.
  2. Remove the bad override to restore defaults.
Defensive patterns

Strategy: validation

When it happens

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