zeroclaw-labs/zeroclaw · error · anyhow::Error

'{key}' must be >= 0

Error message

'{key}' must be >= 0

What it means

Error "'{key}' must be >= 0" thrown in zeroclaw-labs/zeroclaw.

Source

Thrown at crates/zeroclaw-tools/src/browser.rs:780

                output: serde_json::to_string_pretty(&output)
                    .unwrap_or_default()
                    .into(),
                error: None,
            })
        }

        #[cfg(not(feature = "browser-native"))]
        {
            let _ = action;
            anyhow::bail!(
                "Rust-native browser backend is not compiled. Rebuild with --features browser-native"
            )
        }
    }

    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(|| {

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Pass a value >= 0 for the coordinate key.

When it happens

Trigger: Thrown at crates/zeroclaw-tools/src/browser.rs:780 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/5a533ce0bd2f326c. Report an issue: GitHub.