diff --git a/hive-c0re/src/swarm_status.rs b/hive-c0re/src/swarm_status.rs index a32b31fb..822b8564 100644 --- a/hive-c0re/src/swarm_status.rs +++ b/hive-c0re/src/swarm_status.rs @@ -73,10 +73,18 @@ pub fn spawn(mut shutdown: tokio::sync::watch::Receiver) { // A one-shot startup step with no later retry to clear it — // exactly what `set_boot_warning` is for. The fix is a // redeploy, which restarts this process anyway. + // + // `chain`, not `{:#}`: this is the queue client's own error + // type, whose Display ignores the alternate flag, so `{:#}` + // would show only "swarm queue is half-configured" and drop + // which variables are missing. crate::warnings::set_boot_warning( "swarm_status_config", "warn", - format!("swarm status publishing is off: {e:#}"), + format!( + "swarm status publishing is off: {}", + swarm_queue_client::chain(&e) + ), ); return; } @@ -100,10 +108,16 @@ pub fn spawn(mut shutdown: tokio::sync::watch::Receiver) { let client = match swarm_queue_client::connect(cfg).await { Ok(client) => client, Err(e) => { + // `chain` for the same reason as above: without it this + // banner reads "connecting to the swarm queue at " + // and drops the nats error that says why. crate::warnings::set_boot_warning( "swarm_status_config", "warn", - format!("swarm status publishing is off: {e:#}"), + format!( + "swarm status publishing is off: {}", + swarm_queue_client::chain(&e) + ), ); return; }