Skip to content

Commit

Permalink
fix: report RPC response errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodus committed Jul 28, 2023
1 parent 7ce4788 commit 6bb8818
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion graph-gateway/src/chains/ethereum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ impl Client {
.post(rpc.0)
.json(&body)
.send()
.await?
.await
.and_then(|response| response.error_for_status())?
.json::<APIResult<APIBlockHead>>()
.await
.map(|APIResult { result }| BlockHead {
Expand Down

0 comments on commit 6bb8818

Please sign in to comment.