Improve exception handling of Zebra calls

This commit is contained in:
Rene Vergara 2024-03-21 12:52:45 -05:00
parent adc7150b81
commit 69bce58345
Signed by: pitmutt
GPG key ID: 65122AD495A7F5B2

View file

@ -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