Hmbown/CodeWhale · error
Fleet alert URL is not configured
Error message
Fleet alert URL {name} is not configured What it means
Adapters that post to a URL call `required_https_url`, which resolves the URL from the secret resolver and then validates it as https. If the resolver has no value for the named URL secret, the alert cannot be delivered and this error is thrown before any network call.
Solutions
- Set the named URL secret (e.g. a webhook URL) in the resolver's backing store.
- Confirm the name matches the adapter's expected URL key exactly.
- Use `codewhale`'s dry-run/diagnostic output to list which secrets the adapter requires, then supply them.
Example fix
// before # no FLEET_SLACK_WEBHOOK_URL set // after export FLEET_SLACK_WEBHOOK_URL=https://hooks.slack.com/services/...
Defensive patterns
Strategy: validation
Validate before calling
fn ensure_alert_urls(names: &[&str]) -> Result<()> {
for name in names {
let url = std::env::var(name).map_err(|_| anyhow!("missing alert URL {name}"))?;
anyhow::ensure!(url.starts_with("https://"), "alert URL {name} must be https");
}
Ok(())
} Try / catch
match send_alert(adapter, &prepared).await {
Err(e) if e.to_string().contains("URL") && e.to_string().contains("not configured") => {
log::error!("cannot deliver alert, endpoint URL missing: {e}");
}
other => other?,
} Prevention
- Provision webhook URL secrets alongside adapter config and verify at startup.
- Document each adapter's expected URL secret name.
- Use dry-run mode to confirm all URLs resolve before enabling real sends.
When it happens
Trigger: Calling `send_alert` for an adapter whose endpoint URL (e.g. FLEET_SLACK_WEBHOOK_URL) is absent from the resolver when `required_https_url` is invoked.
Common situations: Webhook URL secret never configured in the environment; URL stored under a different name than the adapter expects; secrets mounted only in a different deployment stage.
Understand the failure class
Background: "environment variable is not set" and "Missing keys in environment" errors: what missing required env var messages mean and how to fix them — this error's family across 28 libraries.
Related errors
- fleet alert secret is not configured
- Fleet alert secret is not configured
- Fleet alert URL from
- fleet alert adapter is not configured
- Fleet alert adapter is not configured
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/a246b38b3c091fa4.
Report an issue: GitHub.
Appendix: 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 73e0f67d83)