add logging

This commit is contained in:
Zane Schepke
2024-06-17 17:13:31 -04:00
parent 48e559e72e
commit 19f7e1ad70
+6 -2
View File
@@ -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<String> = serde_json::from_str(&text)?;
Ok(json)
} else if res.status() == StatusCode::NOT_FOUND {
Err(HttpClientError::NotFound)
} else {