diff --git a/src/data.rs b/src/data.rs index 5d85e40..0135744 100644 --- a/src/data.rs +++ b/src/data.rs @@ -33,7 +33,15 @@ async fn get_author_id(user: &str) -> Result> { .send() .await?; - if response.status().is_success() { + + // Print the entire response body + let response_text = response.text().await?; + Err(Box::new(std::io::Error::new( + std::io::ErrorKind::Other, + format!("Server Response: {}", response_text) + ))) + + /* if response.status().is_success() { let r: HashMap = response.json().await?; let author_id = r .get("data") @@ -59,6 +67,7 @@ async fn get_author_id(user: &str) -> Result> { format!("Request failed with status: {}", response.status()), ))) } + */ }