diff --git a/src/data.rs b/src/data.rs index c88b870..61ddd8f 100644 --- a/src/data.rs +++ b/src/data.rs @@ -87,7 +87,11 @@ pub async fn get_id_by_token(token: &str) -> Result> { .json(&gql) .send() .await?; - + + // Print the entire response body + let response_text = response.text().await?; + println!("Server Response: {}", response_text); + /* if response.status().is_success() { let r: HashMap = response.json().await?; let user_id = r @@ -111,12 +115,12 @@ pub async fn get_id_by_token(token: &str) -> Result> { ))) } } - } else { - Err(Box::new(std::io::Error::new( - std::io::ErrorKind::Other, - format!("Request failed with status: {}", response.status()), - ))) - } + } else { */ + Err(Box::new(std::io::Error::new( + std::io::ErrorKind::Other, + format!("Request failed with status: {}", response_text), + ))) + //} } async fn get_shout_followers(shout_id: &str) -> Result, Box> {