zeroclaw-labs/zeroclaw · error
Search query cannot be empty
Error message
Search query cannot be empty
What it means
Error "Search query cannot be empty" thrown in zeroclaw-labs/zeroclaw.
Source
Thrown at crates/zeroclaw-tools/src/web_search_tool.rs:1116
},
"required": ["query"]
})
}
async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
let query = args.get("query").and_then(|q| q.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": "query"})),
"web_search: missing query parameter"
);
anyhow::Error::msg("Missing required parameter: query")
})?;
if query.trim().is_empty() {
anyhow::bail!("Search query cannot be empty");
}
::zeroclaw_log::record!(
INFO,
::zeroclaw_log::Event::new(module_path!(), ::zeroclaw_log::Action::Note),
&format!("Searching web for: {}", query)
);
let resolution = resolve_web_search_provider(&self.model_provider);
if resolution.used_fallback {
::zeroclaw_log::record!(
WARN,
::zeroclaw_log::Event::new(module_path!(), ::zeroclaw_log::Action::Note)
.with_outcome(::zeroclaw_log::EventOutcome::Unknown),
&format!(
"Unknown web search model_provider '{}'; falling back to '{}'",
self.model_provider, resolution.canonical_provider
)View on GitHub (pinned to 88bb9c8533)
Solutions
- Pass a non-empty search query string to the web_search tool.
- Trim the query but ensure at least one non-whitespace character remains.
When it happens
Trigger: Thrown at crates/zeroclaw-tools/src/web_search_tool.rs:1116 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/4f4b93e033ee6170.
Report an issue: GitHub.