From d7752e98667f930095d65536dff20c08fc91abaa Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Thu, 21 Mar 2024 18:26:13 +0000 Subject: [PATCH] Improve response handling for Zebra RPC (#41) This PR includes changes to handle differences between the `zebrad` and `zcashd` RPC. Reviewed-on: https://git.vergara.tech/Vergara_Tech/zcash-haskell/pulls/41 Co-authored-by: Rene Vergara Co-committed-by: Rene Vergara --- src/ZcashHaskell/Utils.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ZcashHaskell/Utils.hs b/src/ZcashHaskell/Utils.hs index 702e453..39296e9 100644 --- a/src/ZcashHaskell/Utils.hs +++ b/src/ZcashHaskell/Utils.hs @@ -23,7 +23,7 @@ import C.Zcash , rustWrapperF4Jumble , rustWrapperF4UnJumble ) -import Control.Exception (try) +import Control.Exception (SomeException(..), try) import Control.Monad.IO.Class import Data.Aeson import qualified Data.ByteString as BS @@ -91,7 +91,7 @@ makeZebraCall host port m params = do setRequestMethod "POST" defaultRequest r <- try $ httpJSON myRequest :: FromJSON a1 => - IO (Either HttpException (Response (RpcResponse a1))) + IO (Either SomeException (Response (RpcResponse a1))) case r of Left ex -> return $ Left $ show ex Right res -> do