zellij-org/zellij · error · anyhow::Error

No host in URL

Error message

No host in URL

What it means

Error "No host in URL" thrown in zellij-org/zellij.

Source

Thrown at zellij-utils/src/shared.rs:221

    let enforce_https_for_localhost = config_options.enforce_https_for_localhost.unwrap_or(false);
    web_server_base_url(
        web_server_ip,
        web_server_port,
        has_certificate,
        enforce_https_for_localhost,
    )
}

pub struct ServerAddress {
    pub ip: String,
    pub port: u16,
}

pub fn parse_base_url(url: &str) -> Result<ServerAddress> {
    let url = url::Url::parse(url)?;
    let ip = url
        .host_str()
        .ok_or_else(|| anyhow!("No host in URL"))?
        .to_string();
    let port = url
        .port_or_known_default()
        .ok_or_else(|| anyhow!("No port in URL"))?;

    Ok(ServerAddress { ip, port })
}

View on GitHub (pinned to 5cb5df5cce)

Solutions

  1. Provide a URL including both host and port, e.g. http://127.0.0.1:8080.
  2. Check the configured URL for typos.

When it happens

Trigger: Occurs at zellij-utils/src/shared.rs:221 when the operation fails: "No host in URL". Currently there is no defensive handling preventing or contextualizing this failure before it surfaces.

Common situations: Misconfigured web/client URL setting.


AI-assisted analysis of zellij-org/zellij@5cb5df5cce (2026-08-19). Data as JSON: /api/errors/4db1892a53aa2825. Report an issue: GitHub.