zeroclaw-labs/zeroclaw · error
Qdrant collection info failed ({status}): {text}
Error message
Qdrant collection info failed ({status}): {text} What it means
count() GETs /collections/{c} and reads result.points_count; purge_session_for_agent() calls it after purging. A non-2xx on that GET raises this error.
Source
Thrown at crates/zeroclaw-memory/src/qdrant.rs:897
.len())
}
async fn count(&self) -> Result<usize> {
self.ensure_initialized().await?;
let resp = self
.request(
reqwest::Method::GET,
&format!("/collections/{}", self.collection),
)
.send()
.await
.context("failed to get Qdrant collection info")?;
if !resp.status().is_success() {
let status = resp.status();
let text = resp.text().await.unwrap_or_default();
anyhow::bail!("Qdrant collection info failed ({status}): {text}");
}
let json: serde_json::Value = resp.json().await?;
let count = json
.get("result")
.and_then(|r| r.get("points_count"))
.and_then(|c| c.as_u64())
.unwrap_or(0);
let count =
usize::try_from(count).context("Qdrant returned a points count that exceeds usize")?;
Ok(count)
}
async fn health_check(&self) -> bool {
let resp = self.request(reqwest::Method::GET, "/").send().await;
View on GitHub (pinned to 88bb9c8533)
Solutions
- Verify collection presence and key with curl
- If dropped: recreate and restart the process (re-init)
- 503: retry after optimization completes (check the collection status field)
- Treat count as advisory at the call site so a failed count doesn't discard the purge result
Defensive patterns
Strategy: try-catch
Type guard
fn is_qdrant_collection_info_error(e: &anyhow::Error) -> bool {
e.to_string().starts_with("Qdrant collection info failed")
} Try / catch
let n = match memory.count().await {
Ok(n) => n,
Err(e) if is_qdrant_collection_info_error(&e) => 0, // stats are advisory; keep the purge result
Err(e) => return Err(e),
}; Prevention
- Treat count() as advisory; never let its failure discard a purge result
- Recheck collection presence after Qdrant maintenance windows
- Retry once on 503 while optimizers run
When it happens
Trigger: 404 collection deleted after init; 401/403 bad key; 503 while Qdrant is resharding or optimizing segments.
Common situations: A post-purge stats call hitting a collection that ops just dropped; api-key rotation; Qdrant returning 503 during optimizer runs.
Related errors
- Qdrant collection creation failed ({status}): {text}
- Qdrant delete failed ({status}): {text}
- Qdrant search failed ({status}): {text}
- Qdrant set payload failed during agent rename ({status}): {t
- Qdrant upsert failed ({status}): {text}
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/64d5963fd9548f7c.
Report an issue: GitHub.