{"record":{"id":"40396bec88da9673","repo":"block/buzz","slug":"host-must-not-be-empty","errorCode":null,"errorMessage":"--host must not be empty","messagePattern":"--host must not be empty","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/buzz-deletion/src/lib.rs","lineNumber":507,"sourceCode":"                .await?;\n            print_json(&sweep)?;\n            Ok(i32::from(sweep.unknown_object_count > 0))\n        }\n        Command::List { .. }\n        | Command::Inspect { .. }\n        | Command::Approve { .. }\n        | Command::Abort { .. }\n        | Command::Unblock { .. } => {\n            anyhow::bail!(\"database-only command reached full-service dispatcher\")\n        }\n    }\n}\n\nfn resolve_submit_host(host: Option<&str>, relay_url: Option<&str>) -> Result<String> {\n    if let Some(host) = host {\n        let host = host.trim();\n        if host.is_empty() {\n            anyhow::bail!(\"--host must not be empty\");\n        }\n        return Ok(host.to_owned());\n    }\n\n    let relay_url = relay_url\n        .map(str::trim)\n        .filter(|value| !value.is_empty())\n        .ok_or_else(|| {\n            anyhow::anyhow!(\"cannot derive community host; pass --host or set RELAY_URL\")\n        })?;\n    let host = buzz_core::tenant::relay_url_authority(relay_url);\n    if host.is_empty() {\n        anyhow::bail!(\n            \"cannot derive community host from RELAY_URL; pass --host or set a valid RELAY_URL\"\n        );\n    }\n    Ok(host)\n}","sourceCodeStart":489,"sourceCodeEnd":525,"githubUrl":"https://github.com/block/buzz/blob/f956e6fe06a76e50cbd8fba1a162482e752e7f1a/crates/buzz-deletion/src/lib.rs#L489-L525","documentation":"resolve_submit_host() in buzz-deletion trims the --host argument and rejects it when the trimmed value is empty. The host names the community whose data deletion operates on, and an empty string would otherwise silently look up a bogus tenant. Note only an EXPLICIT empty --host triggers this — omitting --host entirely falls through to RELAY_URL derivation (or a separate 'cannot derive' error).","triggerScenarios":"Invoking a deletion submit command with `--host \"\"` or `--host \"   \"` — typically an automation script expanding an unset/empty shell variable: `--host \"$COMMUNITY_HOST\"` where COMMUNITY_HOST is empty in that environment.","commonSituations":"CI jobs and cron wrappers passing through variables that are conditionally set; .env files where the host line was commented out but the wrapper still forwards the (now empty) value; manual runs pasting a placeholder.","solutions":["Find why the variable is empty: `echo \"[$COMMUNITY_HOST]\"` in the same shell/script that builds the command.","Either export a real community host (e.g. localhost:3000 or relay.example.com — same authority form the relay seeded) or drop --host entirely and set RELAY_URL instead.","Guard the wrapper: skip the command (or fail with your own message) when the variable is unset, instead of passing an empty string."],"exampleFix":"# before\nCOMMUNITY_HOST=\"\" buzz-deletion submit --host \"$COMMUNITY_HOST\" ...\n# error: --host must not be empty\n\n# after\n: \"${COMMUNITY_HOST:=localhost:3000}\"\nbuzz-deletion submit --host \"$COMMUNITY_HOST\" ...","handlingStrategy":"validation","validationCode":"# in wrappers, never pass through an empty host\nhost=\"${COMMUNITY_HOST:-}\"\nif [[ -z \"${host// /}\" ]]; then\n  echo \"refusing to pass empty --host\" >&2; exit 1\nfi\nexec buzz-deletion submit --host \"$host\" ...","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use shell parameter defaults (`: \"${VAR:=localhost:3000}\"`) so expanded variables are never empty.","Fail fast in wrappers on unset variables (set -u) instead of letting the CLI receive empty strings."],"tags":["buzz-deletion","cli-arguments","host-resolution","validation"],"backgroundTag":"empty-required-parameter","analyzedSha":"f956e6fe06a76e50cbd8fba1a162482e752e7f1a","analyzedAt":"2026-08-16T22:11:40.750Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}