diff --git a/ic-agent/src/agent/http_transport/dynamic_routing/nodes_fetch.rs b/ic-agent/src/agent/http_transport/dynamic_routing/nodes_fetch.rs index 8cbdb474f..1e97374cd 100644 --- a/ic-agent/src/agent/http_transport/dynamic_routing/nodes_fetch.rs +++ b/ic-agent/src/agent/http_transport/dynamic_routing/nodes_fetch.rs @@ -65,6 +65,9 @@ impl Fetch for NodesFetcher { "Failed to build the agent: {err}" )) })?; + agent.fetch_root_key().await.map_err(|err| { + DynamicRouteProviderError::NodesFetchError(format!("Failed to fetch root key: {err}")) + })?; let api_bns = agent .fetch_api_boundary_nodes_by_subnet_id(self.subnet_id) .await