diff --git a/quickwit/quickwit-cli/src/lib.rs b/quickwit/quickwit-cli/src/lib.rs index 21ec50cfdaf..7340ddcd010 100644 --- a/quickwit/quickwit-cli/src/lib.rs +++ b/quickwit/quickwit-cli/src/lib.rs @@ -223,7 +223,11 @@ async fn load_node_config(config_uri: &Uri) -> anyhow::Result { let config_format = ConfigFormat::sniff_from_uri(config_uri)?; let config = NodeConfig::load(config_format, config_content.as_slice()) .await - .with_context(|| format!("failed to parse node config `{config_uri}`"))?; + .with_context(|| { + let config_str = + std::str::from_utf8(&config_content).expect("config should be valid utf-8"); + format!("failed to parse node config `{config_uri}`: {config_str}") + })?; info!(config_uri=%config_uri, config=?config, "loaded node config"); Ok(config) }