Skip to content

Commit

Permalink
fix: improve discovery error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodus committed Dec 9, 2024
1 parent d8efaee commit 85febde
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ thegraph-core = { version = "0.9.0", features = [
"attestation",
"serde",
] }
thegraph-graphql-http = { version = "0.3.1", features = ["reqwest"] }
thegraph-graphql-http = { version = "0.3.2", features = ["reqwest"] }
thiserror = "2.0.2"
tokio = { version = "1.38.0", features = [
"macros",
Expand Down
6 changes: 3 additions & 3 deletions src/network/cost_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl CostModelResolver {
let sources = match self.fetch_cost_model_sources(url, indexings).await {
Ok(sources) => sources,
Err(cost_model_err) => {
tracing::debug!(%url, %cost_model_err);
tracing::debug!(%cost_model_err);
return self.cache.lock().clone();
}
};
Expand Down Expand Up @@ -66,7 +66,7 @@ impl CostModelResolver {
#[derive(serde::Deserialize)]
pub struct CostModelSource {
pub deployment: DeploymentId,
pub model: String,
pub model: Option<String>,
}
let resp = self
.http
Expand All @@ -79,7 +79,7 @@ impl CostModelResolver {
Ok(resp
.cost_models
.into_iter()
.map(|CostModelSource { deployment, model }| (deployment, model))
.filter_map(|CostModelSource { deployment, model }| Some((deployment, model?)))
.collect())
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/network/indexing_progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async fn send_requests(
match result {
Ok(response) => response,
Err(indexing_progress_err) => {
tracing::warn!(%status_url, %indexing_progress_err);
tracing::debug!(%indexing_progress_err);
Default::default()
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/network/poi_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ async fn send_requests(
match result {
Ok(response) => response,
Err(poi_fetch_err) => {
tracing::warn!(%status_url, %poi_fetch_err);
tracing::debug!(%poi_fetch_err);
Default::default()
}
}
Expand Down

0 comments on commit 85febde

Please sign in to comment.