zeroclaw-labs/zeroclaw · error · anyhow::Error
'{field}' must not be empty
Error message
'{field}' must not be empty What it means
Error "'{field}' must not be empty" thrown in zeroclaw-labs/zeroclaw.
Source
Thrown at crates/zeroclaw-tools/src/model_routing_config.rs:186
fn parse_non_empty_string(args: &Value, field: &str) -> anyhow::Result<String> {
let value = args
.get(field)
.and_then(Value::as_str)
.ok_or_else(|| {
::zeroclaw_log::record!(
WARN,
::zeroclaw_log::Event::new(module_path!(), ::zeroclaw_log::Action::Reject)
.with_outcome(::zeroclaw_log::EventOutcome::Failure)
.with_attrs(::serde_json::json!({"param": field})),
"model_routing_config: missing required string param"
);
anyhow::Error::msg(format!("Missing '{field}'"))
})?
.trim();
if value.is_empty() {
anyhow::bail!("'{field}' must not be empty");
}
Ok(value.to_string())
}
fn parse_optional_string_update(args: &Value, field: &str) -> anyhow::Result<MaybeSet<String>> {
let Some(raw) = args.get(field) else {
return Ok(MaybeSet::Unset);
};
if raw.is_null() {
return Ok(MaybeSet::Null);
}
let value = raw
.as_str()
.ok_or_else(|| {
::zeroclaw_log::record!(View on GitHub (pinned to 88bb9c8533)
Solutions
- Provide a non-empty value for the field.
When it happens
Trigger: Thrown at crates/zeroclaw-tools/src/model_routing_config.rs:186 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/81fbd31ad598e699.
Report an issue: GitHub.