cube-js/cube · error · TransportError

request to {} failed: {}

Error message

request to {} failed: {}

What it means

The generic TransportError of the cube-cli HTTP client: the underlying reqwest send for the HTTP request failed before a response was received (connection refused, DNS failure, timeout, TLS problem). The {} placeholders carry the method/URL and the reqwest error chain. Note the CLI already sets Content-Length: 0 for bodyless writes to avoid spurious 411s, so this error points at connectivity rather than framing.

Source

Thrown at rust/cube-cli/src/client.rs:333

        );
        if !query.is_empty() {
            req = req.query(query);
        }
        if let Some(body) = body {
            req = req.json(body);
        } else if matches!(
            *method,
            Method::POST | Method::PUT | Method::PATCH | Method::DELETE
        ) {
            // Bodyless writes still need an explicit Content-Length: 0, otherwise
            // some frontends (e.g. Google GFE) reject them with 411 Length
            // Required. reqwest omits the header for an empty body, so set it.
            req = req
                .header(reqwest::header::CONTENT_LENGTH, "0")
                .body(Vec::<u8>::new());
        }
        let res = req.send().await.map_err(|e| {
            anyhow::Error::new(TransportError {
                url: url.clone(),
                source: e.to_string(),
            })
        })?;
        let status = res.status();
        // Preserve the status even if the response body drops mid-read: callers use it
        // for 404 handling, transient retries, and one-shot refresh after a 401.
        let text = res.text().await.unwrap_or_default();
        Ok((status, text))
    }

    pub async fn request(
        &self,
        method: Method,
        path: &str,
        query: &Query,
        body: Option<&Value>,
    ) -> Result<Value> {

View on GitHub (pinned to 7d981676b3)

Solutions

  1. Confirm the target URL is correct and the server is reachable
  2. Check DNS resolution, proxies, VPN, and TLS settings in the CLI environment
  3. Retry — transient network errors are a common cause
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at rust/cube-cli/src/client.rs:333 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02). Data as JSON: /api/errors/27a0849823682ab5. Report an issue: GitHub.