diff --git a/Cargo.lock b/Cargo.lock index 7c41e6d86c..6feae58d04 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6209,7 +6209,7 @@ dependencies = [ [[package]] name = "nym-data-observatory" -version = "1.0.2" +version = "1.0.3" dependencies = [ "anyhow", "async-trait", diff --git a/nym-data-observatory/Cargo.toml b/nym-data-observatory/Cargo.toml index 39fa28f33f..c6bda86b68 100644 --- a/nym-data-observatory/Cargo.toml +++ b/nym-data-observatory/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "nym-data-observatory" -version = "1.0.2" +version = "1.0.3" authors.workspace = true repository.workspace = true homepage.workspace = true diff --git a/nym-data-observatory/src/price_scraper/mod.rs b/nym-data-observatory/src/price_scraper/mod.rs index 6442118579..efb72a5e9a 100644 --- a/nym-data-observatory/src/price_scraper/mod.rs +++ b/nym-data-observatory/src/price_scraper/mod.rs @@ -29,10 +29,16 @@ impl PriceScraper { async fn get_coingecko_prices(&self) -> anyhow::Result { tracing::info!("💰 Fetching CoinGecko prices from {COINGECKO_API_URL}"); - let response = reqwest::get(COINGECKO_API_URL) - .await? - .json::() - .await; + let response = reqwest::get(COINGECKO_API_URL).await?; + + if !response.status().is_success() { + tracing::error!( + "CoinGecko price query returned error: {}", + response.status() + ); + } + + let response = response.json::().await; tracing::info!("Got response {:?}", response); match response {