tinyhumansai/openhuman · error

unknown namespaces arg

Error message

unknown namespaces arg: {other}

What it means

Catch-all arm of the `openhuman memory namespaces` subcommand's argument loop. This subcommand accepts only -v/--verbose and -h/--help; any other token — a typo, a leftover flag, or a value accidentally passed — is rejected immediately. Generic usage guard, not a store error.

Solutions

  1. Call the subcommand bare or with only -v: `openhuman memory namespaces [-v]`.
  2. Remove any extra arguments; namespaces takes no positional or value flags.
  3. Use -h to print usage.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/core/memory_cli.rs:373 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/5a0c0a21dc6f3b92. Report an issue: GitHub.

Appendix: source

Thrown at src/core/memory_cli.rs:373

            .await
            .map_err(anyhow::Error::msg)
    })?;

    println!("{result}");
    Ok(())
}

/// `openhuman memory namespaces`
fn run_namespaces(args: &[String]) -> Result<()> {
    let mut verbose = false;
    for arg in args {
        match arg.as_str() {
            "-v" | "--verbose" => verbose = true,
            "-h" | "--help" => {
                println!("Usage: openhuman memory namespaces [-v]");
                return Ok(());
            }
            other => return Err(anyhow::anyhow!("unknown namespaces arg: {other}")),
        }
    }

    crate::core::logging::init_for_cli_run(verbose, crate::core::logging::CliLogDefault::Global);

    let rt = tokio::runtime::Builder::new_multi_thread()
        .enable_all()
        .build()?;

    let result = rt.block_on(async {
        let client = create_memory_client("namespaces").await?;
        client.list_namespaces().await.map_err(anyhow::Error::msg)
    })?;

    for ns in &result {
        println!("{ns}");
    }
    Ok(())

View on GitHub (pinned to 7491200858)