{"record":{"id":"2501660b1b7aeb8a","repo":"zeroclaw-labs/zeroclaw","slug":"mcp-server-returned-http","errorCode":null,"errorMessage":"MCP server returned HTTP {}","messagePattern":"MCP server returned HTTP (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-tools/src/mcp_transport.rs","lineNumber":1181,"sourceCode":"        lifecycle.mark_outcome_unknown(epoch_guard.epoch());\n        let resp = req\n            .send()\n            .await\n            .context(\"HTTP request to MCP server failed\")?;\n        drop(epoch_guard);\n\n        if !resp.status().is_success() {\n            let status = resp.status();\n            if self.session_id.lock().is_some()\n                && (status == reqwest::StatusCode::NOT_FOUND || status == reqwest::StatusCode::GONE)\n            {\n                return Err(McpTransportError::StaleSession {\n                    status: status.as_u16(),\n                }\n                .into());\n            }\n            lifecycle.mark_completed();\n            bail!(\"MCP server returned HTTP {}\", status);\n        }\n\n        self.update_session_id_from_headers(resp.headers());\n\n        if request.id.is_none() {\n            return finish_response(\n                request,\n                lifecycle,\n                JsonRpcResponse {\n                    jsonrpc: crate::mcp_protocol::JSONRPC_VERSION.to_string(),\n                    id: None,\n                    result: None,\n                    error: None,\n                },\n            );\n        }\n\n        let is_sse = resp","sourceCodeStart":1163,"sourceCodeEnd":1199,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-tools/src/mcp_transport.rs#L1163-L1199","documentation":"Error \"MCP server returned HTTP {}\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-tools/src/mcp_transport.rs:1181 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the MCP server's HTTP status; verify the endpoint URL and authentication."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}