{"record":{"id":"4dbcaafe96ef7510","repo":"tinyhumansai/openhuman","slug":"failed-to-parse-seltz-response-e","errorCode":null,"errorMessage":"Failed to parse Seltz response: {e}","messagePattern":"Failed to parse Seltz response: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/search/tools/seltz.rs","lineNumber":307,"sourceCode":"            .map_err(|e| {\n                tracing::warn!(\"[seltz] request failed: {e}\");\n                anyhow::anyhow!(\"Seltz 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            let detail = utf8_safe_prefix_at_byte_boundary(&body_text, 500);\n            tracing::warn!(\n                status = %status,\n                \"[seltz] non-2xx response: {detail}\"\n            );\n            anyhow::bail!(\"Seltz returned {status}: {detail}\");\n        }\n\n        let search_resp: SeltzSearchResponse = resp.json().await.map_err(|e| {\n            tracing::warn!(\"[seltz] failed to parse response: {e}\");\n            anyhow::anyhow!(\"Failed to parse Seltz response: {e}\")\n        })?;\n\n        tracing::debug!(\n            doc_count = search_resp.documents.len(),\n            \"[seltz] search complete\"\n        );\n\n        let mut result =\n            ToolResult::success(self.render_results_plain(&search_resp.documents, query));\n        if options.prefer_markdown {\n            result.markdown_formatted =\n                Some(self.render_results_markdown(&search_resp.documents, query));\n        }\n        Ok(result)\n    }\n}\n\n#[cfg(test)]","sourceCodeStart":289,"sourceCodeEnd":325,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/search/tools/seltz.rs#L289-L325","documentation":"Response-deserialization guard in SeltzTool::execute_with_options: the request returned 2xx but the body could not be parsed into the expected Seltz search-response JSON structure — e.g. an HTML or empty body, or an API schema change. The serde error is logged and rewrapped with this message.","triggerScenarios":"Thrown at src/openhuman/search/tools/seltz.rs:307 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry; intermittent malformed responses can be transient.","Confirm the endpoint URL targets the Seltz API version matching the client's response model.","Inspect the raw body in logs and update the Serde model if the 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"}