{"record":{"id":"9b61d92fd3923f92","repo":"tinyhumansai/openhuman","slug":"querit-returned-non-2xx-status-status","errorCode":null,"errorMessage":"Querit returned non-2xx status {status}","messagePattern":"Querit returned non-2xx status (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/search/tools/querit.rs","lineNumber":489,"sourceCode":"            .header(\"Content-Type\", \"application/json\")\n            .header(\"Accept\", \"application/json\")\n            .json(&body)\n            .send()\n            .await\n            .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(),","sourceCodeStart":471,"sourceCodeEnd":507,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/search/tools/querit.rs#L471-L507","documentation":"The Querit search endpoint answered a non-2xx HTTP status; the body is logged (length only) and not embedded. Transport succeeded — this is Querit's own refusal (auth, quota, bad request).","triggerScenarios":"Thrown at src/openhuman/search/tools/querit.rs:489 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the Querit credentials and quota for 401/403","Retry for transient 5xx/429 responses","Inspect the logged body length / warn line for the request shape"],"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"}