Hmbown/CodeWhale · error
fleet alert adapter {} is not configured
Error message
fleet alert adapter {} is not configured What it means
`FleetAlertDispatcher::dispatch` matches routes to event classes, then looks up `route.adapter` in `config.adapters` (fleet/alerts.rs:133). A route naming an adapter key absent from the adapters map is a configuration error and aborts dispatch for that route.
Source
Thrown at crates/tui/src/fleet/alerts.rs:133
R: FleetAlertSecretResolver,
{
pub fn new(config: FleetAlertConfig, resolver: R) -> Self {
Self { config, resolver }
}
pub fn dispatch(&self, event: &FleetAlertEvent) -> Result<Vec<FleetAlertDelivery>> {
if !self.config.enabled {
return Ok(Vec::new());
}
let mut deliveries = Vec::new();
for route in self
.config
.routes
.iter()
.filter(|route| route_matches(route, event.class))
{
let adapter = self.config.adapters.get(&route.adapter).ok_or_else(|| {
anyhow!("fleet alert adapter {} is not configured", route.adapter)
})?;
let prepared = prepare_alert(&route.adapter, adapter, event, self.config.dry_run)?;
let sent = if self.config.dry_run {
false
} else {
send_alert(adapter, &prepared.body, &self.resolver)?
};
deliveries.push(FleetAlertDelivery {
adapter: route.adapter.clone(),
event_class: event.class,
dry_run: self.config.dry_run,
sent,
redacted_payload: prepared.redacted_payload,
});
}
Ok(deliveries)
}
}View on GitHub (pinned to 8880682c63)
Solutions
- Add an adapters entry whose key exactly equals `route.adapter`
- Or repoint the route at an adapter key that exists
- Cross-validate routes against adapters at config load so the mismatch surfaces before any event fires
Example fix
// before
"routes": [{"events": [], "adapter": "slack"}],
"adapters": {"webhook": {"type": "webhook"}}
// after
"routes": [{"events": [], "adapter": "slack"}],
"adapters": {"slack": {"type": "webhook"}} Defensive patterns
Strategy: validation
Validate before calling
for route in &config.routes {
anyhow::ensure!(
config.adapters.contains_key(&route.adapter),
"route references unknown adapter '{}'",
route.adapter
);
} Type guard
fn all_routes_have_adapters(config: &FleetAlertConfig) -> bool {
config.routes
.iter()
.all(|r| config.adapters.contains_key(&r.adapter))
} Prevention
- Validate alert config at load time, not at event time
- Exercise dispatch with dry_run in CI to catch config drift
- Rename adapters and routes together in one change
When it happens
Trigger: A route says `adapter: "slack"` while the adapters map only defines `webhook`; an adapter was renamed without updating routes; the adapter block was dropped in an environment-specific config.
Common situations: Config drift between environments; hand-edited fleet alert config; route templates copied without matching adapter definitions.
Related errors
- fleet alert secret {name} is not configured
- fleet alert URL {name} is not configured
- fleet alert URL from {name} must use https
- Runtime API capability '${options.capability}' is not availa
- Runtime API request failed (${response.status}) for ${method
AI-assisted analysis of Hmbown/CodeWhale@8880682c63 (2026-08-16).
Data as JSON: /api/errors/5c286cb934fd60f2.
Report an issue: GitHub.