tinyhumansai/openhuman · error
reqwest client must build
Error message
reqwest client must build
What it means
Panic payload on reqwest::Client::builder().build() in McpHttpClient's constructor: the builder sets overall + connect timeouts and a bounded redirect policy (so vanity-URL MCP servers that 30x to their real endpoint connect). Construction depends only on these static choices, so failure indicates a TLS/proxy environment problem and the expect aborts client creation for that MCP endpoint.
Source
Thrown at src/openhuman/mcp/http_client/client.rs:233
endpoint: String,
timeout_secs: u64,
auth: McpAuthConfig,
identity: McpClientIdentityConfig,
) -> Self {
let builder = reqwest::Client::builder()
.timeout(Duration::from_secs(timeout_secs))
.connect_timeout(Duration::from_secs(10))
// Follow a bounded number of redirects so servers published behind a
// vanity/short URL that 30x-redirects to their real MCP endpoint
// (e.g. `sh.inference.ac` -> `api.inference.sh/mcp`) connect instead
// of failing with a raw `MCP HTTP 301`. `Policy::limited` is safe
// here: reqwest strips sensitive headers (Authorization, Cookie) on
// cross-origin redirects, so a server bearer token is never leaked
// to the redirect target.
.redirect(reqwest::redirect::Policy::limited(5));
let builder =
crate::openhuman::config::apply_runtime_proxy_to_builder(builder, "tool.mcp_client");
let http = builder.build().expect("reqwest client must build");
Self {
endpoint,
http,
next_id: AtomicI64::new(1),
client_info: McpClientInfo {
name: identity.name,
title: Some(identity.title),
version: identity.version,
},
auth,
state: Mutex::new(SessionState {
negotiated_protocol_version: LATEST_PROTOCOL_VERSION.to_string(),
..SessionState::default()
}),
}
}
pub fn endpoint(&self) -> &str {View on GitHub (pinned to 7491200858)
Solutions
- Check environment proxy variables and their interaction with reqwest's defaults
- Verify the TLS features compiled into this build
- Propagate the error instead of panicking so one bad endpoint does not take down MCP init
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/openhuman/mcp/http_client/client.rs:233 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/97faaec2f3562117.
Report an issue: GitHub.