diff --git a/cli/src/main.rs b/cli/src/main.rs index 561eef9..b66bafe 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -545,11 +545,27 @@ async fn print_response_entries(response: reqwest::Response, format: OutputForma entries.for_each(|(_, entry)| { println!( "{}\t{}\t{}\t{}\t{}", - entry.get("entity").and_then(|e| e.as_str()).unwrap(), - entry.get("attribute").and_then(|a| a.as_str()).unwrap(), - entry.get("value").and_then(|v| v.get("c")).unwrap(), - entry.get("timestamp").and_then(|t| t.as_str()).unwrap(), - entry.get("provenance").and_then(|p| p.as_str()).unwrap(), + entry + .get("entity") + .and_then(|e| e.as_str()) + .unwrap_or("???"), + entry + .get("attribute") + .and_then(|a| a.as_str()) + .unwrap_or("???"), + entry + .get("value") + .and_then(|v| v.get("c")) + .map(|c| format!("{c}")) + .unwrap_or("???".to_string()), + entry + .get("timestamp") + .and_then(|t| t.as_str()) + .unwrap_or("???"), + entry + .get("provenance") + .and_then(|p| p.as_str()) + .unwrap_or("???"), ) }) }