Skip to content

Commit

Permalink
Improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
darunrs committed Jun 8, 2024
1 parent 074a19a commit d007c67
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions block-streamer/src/graphql/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ impl GraphQLClientImpl {
})
.await?
.data
.ok_or(anyhow::anyhow!("No bitmaps were returned"))
.ok_or(anyhow::anyhow!(
"Query response is malformed. Missing data field."
))
.map(|data| data.darunrs_near_bitmap_v5_actions_index)?;

has_more = query_result.len() >= QUERY_LIMIT as usize;
Expand Down Expand Up @@ -115,7 +117,9 @@ impl GraphQLClientImpl {
})
.await?
.data
.ok_or(anyhow::anyhow!("No bitmaps were returned"))
.ok_or(anyhow::anyhow!(
"Query response is malformed. Missing data field."
))
.map(|data| data.darunrs_near_bitmap_v5_actions_index)?;

has_more = query_result.len() >= QUERY_LIMIT as usize;
Expand Down

0 comments on commit d007c67

Please sign in to comment.