Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuDutSik committed Jul 18, 2024
1 parent bfba230 commit 4ba8768
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions linera-service/src/cli_wrappers/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,12 @@ impl NodeService {
.json(&json!({ "query": query }))
.send()
.await
.with_context(|| format!("query_node: failed to post query={}", query.get(..200).unwrap_or(query)))?;
.with_context(|| {
format!(
"query_node: failed to post query={}",
query.get(..200).unwrap_or(query)
)
})?;
anyhow::ensure!(
response.status().is_success(),
"Query \"{}\" failed: {}",
Expand Down Expand Up @@ -1220,7 +1225,12 @@ impl Faucet {
.json(&json!({ "query": &query }))
.send()
.await
.with_context(|| format!("claim: failed to post query={}", query.get(..200).unwrap_or(&query)))?;
.with_context(|| {
format!(
"claim: failed to post query={}",
query.get(..200).unwrap_or(&query)
)
})?;
anyhow::ensure!(
response.status().is_success(),
"Query \"{}\" failed: {}",
Expand Down Expand Up @@ -1314,7 +1324,12 @@ impl<A> ApplicationWrapper<A> {
.json(&json!({ "query": query }))
.send()
.await
.with_context(|| format!("raw_query: failed to post query={}", query.get(..200).unwrap_or(query)))?;
.with_context(|| {
format!(
"raw_query: failed to post query={}",
query.get(..200).unwrap_or(query)
)
})?;
anyhow::ensure!(
response.status().is_success(),
"Query \"{}\" failed: {}",
Expand Down

0 comments on commit 4ba8768

Please sign in to comment.