{"record":{"id":"91532d0f6c4b9a76","repo":"tinyhumansai/openhuman","slug":"unknown-sentry-test-arg-other","errorCode":null,"errorMessage":"unknown sentry-test arg: {other}","messagePattern":"unknown sentry-test arg: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/cli.rs","lineNumber":267,"sourceCode":"                do_panic = true;\n                i += 1;\n            }\n            \"-h\" | \"--help\" => {\n                println!(\"Usage: openhuman sentry-test [--message <text>] [--panic]\");\n                println!();\n                println!(\"  --message <text>  Body of the Error-level event sent to Sentry\");\n                println!(\"                    (default: \\\"openhuman sentry-test ping\\\")\");\n                println!(\"  --panic           After capturing the event, trigger a panic so the\");\n                println!(\"                    panic integration reports it as a separate event.\");\n                println!();\n                println!(\n                    \"Requires OPENHUMAN_CORE_SENTRY_DSN (or the legacy OPENHUMAN_SENTRY_DSN alias)\"\n                );\n                println!(\"at runtime, or baked into the binary at build time via option_env!. On\");\n                println!(\"success, prints the event UUID to stdout.\");\n                return Ok(());\n            }\n            other => return Err(anyhow::anyhow!(\"unknown sentry-test arg: {other}\")),\n        }\n    }\n\n    let client = sentry::Hub::current().client();\n    let dsn_host = client\n        .as_deref()\n        .and_then(|c| c.dsn())\n        .map(|d| d.host().to_string());\n\n    match &dsn_host {\n        Some(host) => eprintln!(\"[sentry-test] Sentry client active (dsn host: {host})\"),\n        None => {\n            return Err(anyhow::anyhow!(\n                \"Sentry is not initialized in this binary — no DSN is resolvable. \\\n                 Set OPENHUMAN_CORE_SENTRY_DSN (or the legacy OPENHUMAN_SENTRY_DSN alias) \\\n                 in the environment (or rebuild with it defined at compile time) and try again.\"\n            ));\n        }","sourceCodeStart":249,"sourceCodeEnd":285,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/core/cli.rs#L249-L285","documentation":"`sentry-test` accepts exactly `--message <text>`, `--panic`, and `-h`/`--help`; every other token falls into the catch-all arm and is rejected with its literal text. The parser does exact-string matching, so equals-joined forms (`--message=hi`) and typo'd flags (`--msg`) both land here rather than being interpreted.","triggerScenarios":"`openhuman sentry-test --message=hi` (equals form not supported); `--msg \"text\"` (typo); a stray positional argument like `openhuman sentry-test test`.","commonSituations":"Muscle memory from tools that accept `key=value` flags; renamed or guessed flag names; leftover positional arguments in scripts.","solutions":["Run `openhuman sentry-test --help` and use only the listed flags","Use the space-separated form: `--message \"text\"` and/or `--panic`","Remove stray positional arguments — sentry-test takes subcommand-style flags only"],"exampleFix":"# before\nopenhuman sentry-test --message=hi\n# after\nopenhuman sentry-test --message hi","handlingStrategy":"validation","validationCode":"# bash: whitelist the only tokens sentry-test understands\ncase \"${1:-}\" in\n  --message|--panic|-h|--help) ;;\n  \"\") ;;\n  *) echo \"unsupported sentry-test flag: $1 (use --message <text> | --panic | --help)\" >&2; exit 2 ;;\nesac","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check `openhuman sentry-test --help` once and encode its exact flags in scripts","Avoid key=value flag syntax with this CLI — it is exact-token matching","Send free-form text as the --message value, never as extra positional tokens"],"tags":["cli","sentry","argument-parsing"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}