{"record":{"id":"49d71ed7c0344689","repo":"tinyhumansai/openhuman","slug":"seltz-returned-status-detail","errorCode":null,"errorMessage":"Seltz returned {status}: {detail}","messagePattern":"Seltz returned (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/search/tools/seltz.rs","lineNumber":302,"sourceCode":"            .header(\"x-api-key\", api_key)\n            .header(\"Content-Type\", \"application/json\")\n            .json(&body)\n            .send()\n            .await\n            .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        }","sourceCodeStart":284,"sourceCodeEnd":320,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/search/tools/seltz.rs#L284-L320","documentation":"The Seltz search API answered a non-success HTTP status; {detail} embeds a UTF-8-safe 500-char body prefix. Auth (x-api-key), quota and upstream errors all surface here.","triggerScenarios":"Thrown at src/openhuman/search/tools/seltz.rs:302 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the Seltz API key for 401/403","Retry after the quota window for 429","Read {detail} for Seltz's own error reason"],"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"}