diff --git a/crates/astria-bridge-withdrawer/src/main.rs b/crates/astria-bridge-withdrawer/src/main.rs index 60b61e286..89e6f6893 100644 --- a/crates/astria-bridge-withdrawer/src/main.rs +++ b/crates/astria-bridge-withdrawer/src/main.rs @@ -52,8 +52,13 @@ async fn main() -> ExitCode { let mut sigterm = signal(SignalKind::terminate()) .expect("setting a SIGTERM listener should always work on Unix"); - let (withdrawer, shutdown_handle) = - BridgeWithdrawer::new(cfg).expect("could not initialize withdrawer"); + let (withdrawer, shutdown_handle) = match BridgeWithdrawer::new(cfg) { + Err(error) => { + error!(%error, "failed initializing bridge withdrawer"); + return ExitCode::FAILURE; + } + Ok(handles) => handles, + }; let withdrawer_handle = tokio::spawn(withdrawer.run()); let shutdown_token = shutdown_handle.token();