Skip to content

Commit 04aade9

Browse files
Update src/handlers/http/cluster/mod.rs
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Nikhil Sinha <[email protected]>
1 parent 1841a68 commit 04aade9

File tree

1 file changed

+9
-1
lines changed
  • src/handlers/http/cluster

1 file changed

+9
-1
lines changed

src/handlers/http/cluster/mod.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,15 @@ pub async fn get_node_info<T: Metadata + DeserializeOwned>(
736736
)
737737
.await?
738738
.iter()
739-
.filter_map(|x| serde_json::from_slice::<T>(x).ok())
739+
.filter_map(|x| {
740+
match serde_json::from_slice::<T>(x) {
741+
Ok(val) => Some(val),
742+
Err(e) => {
743+
error!("Failed to parse node metadata: {:?}", e);
744+
None
745+
}
746+
}
747+
})
740748
.collect();
741749

742750
Ok(metadata)

0 commit comments

Comments
 (0)