Account for missing response fields in Zebra response #43

Merged
pitmutt merged 9 commits from rav001 into dev040 2024-03-22 18:04:05 +00:00
Showing only changes of commit 69bce58345 - Show all commits

View file

@ -23,7 +23,7 @@ import C.Zcash
, rustWrapperF4Jumble , rustWrapperF4Jumble
, rustWrapperF4UnJumble , rustWrapperF4UnJumble
) )
import Control.Exception (try) import Control.Exception (SomeException(..), try)
import Control.Monad.IO.Class import Control.Monad.IO.Class
import Data.Aeson import Data.Aeson
import qualified Data.ByteString as BS import qualified Data.ByteString as BS
@ -91,7 +91,7 @@ makeZebraCall host port m params = do
setRequestMethod "POST" defaultRequest setRequestMethod "POST" defaultRequest
r <- r <-
try $ httpJSON myRequest :: FromJSON a1 => try $ httpJSON myRequest :: FromJSON a1 =>
IO (Either HttpException (Response (RpcResponse a1))) IO (Either SomeException (Response (RpcResponse a1)))
case r of case r of
Left ex -> return $ Left $ show ex Left ex -> return $ Left $ show ex
Right res -> do Right res -> do