Hmbown/CodeWhale · error

fleet alert URL {name} is not configured

Error message

fleet alert URL {name} is not configured

What it means

Same resolver path as [495] but for URL values: `required_https_url` first needs the resolver to return the named variable (fleet/alerts.rs:498). When it is unset or empty, dispatch fails with 'URL {name} is not configured'; scheme validation only happens after this resolves.

Source

Thrown at crates/tui/src/fleet/alerts.rs:498

    }
}

fn required_secret<R>(resolver: &R, name: &str) -> Result<String>
where
    R: FleetAlertSecretResolver,
{
    resolver
        .resolve(name)
        .ok_or_else(|| anyhow!("fleet alert secret {name} is not configured"))
}

fn required_https_url<R>(resolver: &R, name: &str) -> Result<String>
where
    R: FleetAlertSecretResolver,
{
    let url = resolver
        .resolve(name)
        .ok_or_else(|| anyhow!("fleet alert URL {name} is not configured"))?;
    validate_https_alert_url(name, &url)?;
    Ok(url)
}

fn validate_https_alert_url(name: &str, url: &str) -> Result<()> {
    let parsed = reqwest::Url::parse(url)
        .with_context(|| format!("fleet alert URL from {name} is not a valid URL"))?;
    if parsed.scheme() != "https" {
        return Err(anyhow!("fleet alert URL from {name} must use https"));
    }
    Ok(())
}

fn short_reason(reason: &str) -> String {
    let trimmed = reason.trim();
    if trimmed.len() <= 240 {
        return trimmed.to_string();
    }

View on GitHub (pinned to 8880682c63)

Solutions

  1. Set the named URL variable to a non-empty https URL in the dispatcher's environment
  2. Fix the variable name in adapter config
  3. Validate the full alert config with a dry_run dispatch before going live

Example fix

# before: FLEET_ALERT_WEBHOOK_URL unset
# after
export FLEET_ALERT_WEBHOOK_URL=https://example.com/hook
Defensive patterns

Strategy: validation

Validate before calling

let url = std::env::var(&adapter.url_env)
    .ok()
    .filter(|v| !v.is_empty());
anyhow::ensure!(
    url.is_some(),
    "configure {} before dispatching alerts",
    adapter.url_env
);

Prevention

When it happens

Trigger: The URL env var named by the adapter is unset or empty in the dispatching process; the variable name in config has a typo; the URL is provisioned in one environment but not another.

Common situations: Webhook endpoint URL missing in CI or a new deployment; the URL variable was renamed without updating adapter config.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@8880682c63 (2026-08-16). Data as JSON: /api/errors/b56724963868014e. Report an issue: GitHub.