diff --git a/src/main.rs b/src/main.rs index 9eed3b5..5eceb07 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,10 +4,14 @@ async fn main() -> anyhow::Result<()> { let cli = subway::cli::parse_args(); let config = subway::config::read_config(&cli.config)?; tracing::trace!("{:#?}", config); - subway::config::validate(&config).await?; + + let validate_res = subway::config::validate(&config).await; + if let Err(err) = &validate_res { + tracing::error!("Config validation failed: {err:?}"); + } // early return if we're just validating the config if cli.is_validate() { - return Ok(()); + return validate_res; } let subway_server = subway::server::build(config).await?;