Skip to content

Commit

Permalink
Add the range information in parse error
Browse files Browse the repository at this point in the history
  • Loading branch information
enobayram committed Dec 18, 2023
1 parent 34a7d6a commit 170c407
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions haskell-src/exec/Chainweb/Lookups.hs
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ blocksBetween env (cid, Low low, High up) = do
itemParser = withObject "Block" $ \o -> do
(,) <$> o .: "header" <*> o .: "payloadWithOutputs"
case parseEither itemParser item of
Left e -> Nothing <$
logg Logger.Error (fromString $ printf "Error parsing block %d: %s" idx e)
Left e -> Nothing <$ logg Logger.Error
(fromString $ printf "Error parsing block %d in range (%d, %d, %d): %s" idx cid low up e)
Right res -> pure $ Just res
where
v = _nodeInfo_chainwebVer $ _env_nodeInfo env
Expand Down

0 comments on commit 170c407

Please sign in to comment.