{"record":{"id":"da30507f2398ed9c","repo":"tinyhumansai/openhuman","slug":"failed-to-read-querit-response-json-e","errorCode":null,"errorMessage":"Failed to read Querit response JSON: {e}","messagePattern":"Failed to read Querit response JSON: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/search/tools/querit.rs","lineNumber":494,"sourceCode":"            .map_err(|e| {\n                tracing::warn!(\"[querit] request failed: {e}\");\n                anyhow::anyhow!(\"Querit search request failed: {e}\")\n            })?;\n\n        let status = resp.status();\n        if !status.is_success() {\n            let body_text = resp.text().await.unwrap_or_default();\n            tracing::warn!(\n                status = %status,\n                body_len = body_text.len(),\n                \"[querit] non-2xx response from Querit\"\n            );\n            anyhow::bail!(\"Querit returned non-2xx status {status}\");\n        }\n\n        let search_resp = Self::decode_response(resp.json().await.map_err(|e| {\n            tracing::warn!(\"[querit] failed to read response JSON: {e}\");\n            anyhow::anyhow!(\"Failed to read Querit response JSON: {e}\")\n        })?)?;\n\n        if search_resp.error_code != 0 && search_resp.error_code != 200 {\n            tracing::warn!(\n                error_code = search_resp.error_code,\n                error_msg_len = search_resp.error_msg.chars().count(),\n                \"[querit] application-level error from Querit\"\n            );\n            anyhow::bail!(\"Querit returned error_code {}\", search_resp.error_code);\n        }\n\n        tracing::debug!(\n            result_count = search_resp.results.result.len(),\n            search_id = search_resp.search_id,\n            \"[querit] search complete\"\n        );\n\n        let mut result =","sourceCodeStart":476,"sourceCodeEnd":512,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/search/tools/querit.rs#L476-L512","documentation":"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.","triggerScenarios":"Thrown at src/openhuman/search/tools/querit.rs:494 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}