Skip to content

Commit dd068ce

Browse files
committed
feat(mgmt): log error on conversion failure
Signed-off-by: Fredi Raspall <[email protected]>
1 parent 01052ec commit dd068ce

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mgmt/src/grpc/server.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use async_trait::async_trait;
77
use std::sync::Arc;
88
use tonic::{Request, Response, Status};
9-
use tracing::debug;
9+
use tracing::{debug, error};
1010

1111
use crate::processor::proc::{ConfigChannelRequest, ConfigRequest, ConfigResponse};
1212
use config::converters::grpc::{
@@ -172,7 +172,11 @@ impl ConfigManager for BasicConfigManager {
172172
debug!("Received request to apply new config");
173173

174174
// Convert config from gRPC to native external model
175-
let external_config = convert_gateway_config_from_grpc_with_defaults(&grpc_config)?;
175+
let external_config = convert_gateway_config_from_grpc_with_defaults(&grpc_config)
176+
.map_err(|e| {
177+
error!("Failed to process apply config: {e}");
178+
e
179+
})?;
176180

177181
// Create a new GwConfig with this ExternalConfig
178182
let gw_config = Box::new(GwConfig::new(external_config));

0 commit comments

Comments
 (0)