tinyhumansai/openhuman · error
Failed to read Querit response JSON: {e}
Error message
Failed to read Querit response JSON: {e} What it means
Response-deserialization guard in QueritTool::execute_with_options: the HTTP request succeeded (2xx) but the response body could not be parsed into the expected search-response JSON structure — the endpoint returned HTML, an error page, or a schema that drifted from the client's Serde model. The serde error is logged and rewrapped with this message.
Source
Thrown at src/openhuman/search/tools/querit.rs:494
.map_err(|e| {
tracing::warn!("[querit] request failed: {e}");
anyhow::anyhow!("Querit search request failed: {e}")
})?;
let status = resp.status();
if !status.is_success() {
let body_text = resp.text().await.unwrap_or_default();
tracing::warn!(
status = %status,
body_len = body_text.len(),
"[querit] non-2xx response from Querit"
);
anyhow::bail!("Querit returned non-2xx status {status}");
}
let search_resp = Self::decode_response(resp.json().await.map_err(|e| {
tracing::warn!("[querit] failed to read response JSON: {e}");
anyhow::anyhow!("Failed to read Querit response JSON: {e}")
})?)?;
if search_resp.error_code != 0 && search_resp.error_code != 200 {
tracing::warn!(
error_code = search_resp.error_code,
error_msg_len = search_resp.error_msg.chars().count(),
"[querit] application-level error from Querit"
);
anyhow::bail!("Querit returned error_code {}", search_resp.error_code);
}
tracing::debug!(
result_count = search_resp.results.result.len(),
search_id = search_resp.search_id,
"[querit] search complete"
);
let mut result =View on GitHub (pinned to 7491200858)
Solutions
- Retry; some endpoints intermittently return malformed or empty bodies.
- Verify the Querit endpoint URL points at the API version whose response schema matches the client.
- Capture the raw body via debug logging and update the deserialization model if the API contract changed.
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at src/openhuman/search/tools/querit.rs:494 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/da30507f2398ed9c.
Report an issue: GitHub.