alt-art / genius-rs

Rust library that allows interact with Genius API
https://crates.io/crates/genius-rs
MIT License
7 stars 3 forks source link

ParseError: error decoding response body #13

Open alejandro0619 opened 1 year ago

alejandro0619 commented 1 year ago
use genius_rs::Genius;

#[tokio::main]
async fn main() {
    let genius = Genius::new(dotenv::var("TOKEN").unwrap());
    let response = genius.search("Sia").await;

    match response {
      Ok(resp) => println!("{:?}", resp),
      Err(e) => println!("{:?}", e),
    }

}

I was checking the examples listed in the readme, but I couldn't reproduce them since the error says that the response can't be parsed because it's not a valid. The error is the following:

ParseError("error decoding response body: missing field `response` at line 1 column 134")

alt-art commented 1 year ago

Sorry for the late reply, I'll check this error.