coingecko-rs icon indicating copy to clipboard operation
coingecko-rs copied to clipboard

Invalid result when rate limit is hit

Open gitmalong opened this issue 3 years ago • 0 comments

let result: Result<HashMap<String, Price>, Error> = client
                .price(ids, &["usd"], false, false, false, false)
                .await;

In case the rate limit is hit the resulting hashmap has a key "status" instead of valid price entries. I'd expect the client to return an error instead but instead it seems to just return the reqwest response without validating the status code.

gitmalong avatar Jan 04 '23 08:01 gitmalong