From 19f7e1ad70424540249e72d6dd3d12e95af99986 Mon Sep 17 00:00:00 2001 From: Zane Schepke Date: Mon, 17 Jun 2024 17:13:31 -0400 Subject: [PATCH] add logging --- common/http-api-client/src/lib.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/http-api-client/src/lib.rs b/common/http-api-client/src/lib.rs index 0102a019bb..f5c863f914 100644 --- a/common/http-api-client/src/lib.rs +++ b/common/http-api-client/src/lib.rs @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize}; use std::fmt::Display; use std::time::Duration; use thiserror::Error; -use tracing::warn; +use tracing::{info, warn}; use url::Url; pub use reqwest::IntoUrl; @@ -520,7 +520,11 @@ where } if res.status().is_success() { - Ok(res.json().await?) + let text = res.text()?.await; + info!("{:#?}", res); + info!("{:#?}", text); + let json: Vec = serde_json::from_str(&text)?; + Ok(json) } else if res.status() == StatusCode::NOT_FOUND { Err(HttpClientError::NotFound) } else {