{"record":{"id":"b56724963868014e","repo":"Hmbown/CodeWhale","slug":"fleet-alert-url-name-is-not-configured","errorCode":null,"errorMessage":"fleet alert URL {name} is not configured","messagePattern":"fleet alert URL (.+?) is not configured","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/fleet/alerts.rs","lineNumber":498,"sourceCode":"    }\n}\n\nfn required_secret<R>(resolver: &R, name: &str) -> Result<String>\nwhere\n    R: FleetAlertSecretResolver,\n{\n    resolver\n        .resolve(name)\n        .ok_or_else(|| anyhow!(\"fleet alert secret {name} is not configured\"))\n}\n\nfn required_https_url<R>(resolver: &R, name: &str) -> Result<String>\nwhere\n    R: FleetAlertSecretResolver,\n{\n    let url = resolver\n        .resolve(name)\n        .ok_or_else(|| anyhow!(\"fleet alert URL {name} is not configured\"))?;\n    validate_https_alert_url(name, &url)?;\n    Ok(url)\n}\n\nfn validate_https_alert_url(name: &str, url: &str) -> Result<()> {\n    let parsed = reqwest::Url::parse(url)\n        .with_context(|| format!(\"fleet alert URL from {name} is not a valid URL\"))?;\n    if parsed.scheme() != \"https\" {\n        return Err(anyhow!(\"fleet alert URL from {name} must use https\"));\n    }\n    Ok(())\n}\n\nfn short_reason(reason: &str) -> String {\n    let trimmed = reason.trim();\n    if trimmed.len() <= 240 {\n        return trimmed.to_string();\n    }","sourceCodeStart":480,"sourceCodeEnd":516,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/crates/tui/src/fleet/alerts.rs#L480-L516","documentation":"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.","triggerScenarios":"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.","commonSituations":"Webhook endpoint URL missing in CI or a new deployment; the URL variable was renamed without updating adapter config.","solutions":["Set the named URL variable to a non-empty https URL in the dispatcher's environment","Fix the variable name in adapter config","Validate the full alert config with a dry_run dispatch before going live"],"exampleFix":"# before: FLEET_ALERT_WEBHOOK_URL unset\n# after\nexport FLEET_ALERT_WEBHOOK_URL=https://example.com/hook","handlingStrategy":"validation","validationCode":"let url = std::env::var(&adapter.url_env)\n    .ok()\n    .filter(|v| !v.is_empty());\nanyhow::ensure!(\n    url.is_some(),\n    \"configure {} before dispatching alerts\",\n    adapter.url_env\n);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check required alert env vars at process start","Validate the full alert config with dry_run before enabling live dispatch","Document required variables per adapter next to the config that names them"],"tags":["alerts","fleet","configuration","url","environment"],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}