From ca697f53c94562843d1f82eb4b9849e14dd1aaa8 Mon Sep 17 00:00:00 2001 From: Ollo Date: Fri, 15 Sep 2023 19:00:10 +0200 Subject: [PATCH] JSON response only printed on parsing errors --- client/bin/src/straba.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/bin/src/straba.rs b/client/bin/src/straba.rs index ccd68e9..c5f1f92 100644 --- a/client/bin/src/straba.rs +++ b/client/bin/src/straba.rs @@ -90,12 +90,14 @@ pub fn fetch_data() -> Option<&'static str> { return Option::None; } let rawText = &text.unwrap(); - println!("{}", &rawText); let body: std::result::Result = serde_json::from_str(&rawText); if body.is_err() { println!("Could not parse json {:?}", body.err()); + println!("------------------------- %< ----------------------------"); + println!("{}", &rawText); + println!("------------------------- %< ----------------------------"); return Option::None; }