diff --git a/WatcherAgent/src/config.rs b/WatcherAgent/src/config.rs index c569b26..9f137ab 100644 --- a/WatcherAgent/src/config.rs +++ b/WatcherAgent/src/config.rs @@ -36,6 +36,13 @@ impl Settings { .prefix_separator("_"), ); - builder.build()?.try_deserialize() + let config = builder.build()?; + + // Try to deserialize and provide error message + config.try_deserialize().map_err(|e| { + eprintln!("Configuration error: {}", e); + eprintln!("Required fields: server.url, app.heartbeat_interval_secs, app.metrics_interval_secs, app.port"); + e + }) } }