cube-js/cube · error

request to {url} failed: {e}

Error message

request to {url} failed: {e}

What it means

A reqwest send failure while POSTing a multipart form in the cube-cli HTTP client: the request to the composed URL never completed (DNS failure, connection refused, TLS error, timeout). This is the TransportError path — the server was not necessarily reached at all, distinguishing it from an HTTP error status.

Source

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

    /// POST a multipart form. `build_form` is called per attempt because a
    /// form can only be sent once (the 401-refresh retry needs a fresh one).
    pub async fn post_multipart<F>(&self, path: &str, build_form: F) -> Result<Value>
    where
        F: Fn() -> reqwest::multipart::Form,
    {
        let url = format!("{}{}", self.base_url, path);
        let send = |form: reqwest::multipart::Form, token: String| {
            let http = &self.http;
            let url = &url;
            async move {
                let res = http
                    .post(url)
                    .header(reqwest::header::AUTHORIZATION, Self::authorization(&token))
                    .multipart(form)
                    .send()
                    .await
                    .map_err(|e| anyhow!("request to {url} failed: {e}"))?;
                let status = res.status();
                let text = res
                    .text()
                    .await
                    .map_err(|e| anyhow!("reading the response from {url} failed: {e}"))?;
                Ok::<_, anyhow::Error>((status, text))
            }
        };

        let (mut status, mut text) = send(build_form(), self.token()).await?;
        if status == StatusCode::UNAUTHORIZED && self.try_refresh().await? {
            let (s, t) = send(build_form(), self.token()).await?;
            status = s;
            text = t;
        }
        self.finish_response(&Method::POST, path, status, text)
    }

View on GitHub (pinned to 7d981676b3)

Solutions

  1. Verify the base URL and network connectivity to the Cube endpoint
  2. Check for proxy, DNS, or TLS configuration issues in the CLI environment
  3. Retry the command — transient network failures often clear on their own
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at rust/cube-cli/src/client.rs:381 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/e06af6d20a17f154. Report an issue: GitHub.