From a5e18e178a9400b9413ef76921f4163f73375371 Mon Sep 17 00:00:00 2001 From: Emmanuel Denloye-Ito Date: Mon, 3 Jun 2024 18:59:25 -0400 Subject: [PATCH] debug cut query --- exec/TXG.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/exec/TXG.hs b/exec/TXG.hs index 2e1595e..95019a0 100644 --- a/exec/TXG.hs +++ b/exec/TXG.hs @@ -709,7 +709,13 @@ queryCut mgr (HostAddress h p) version = do let url = "https://" <> hostnameToText h <> ":" <> portToText p <> "/chainweb/0.0/" <> chainwebVersionToText version <> "/cut" req <- parseRequest $ T.unpack url res <- handleRequest req mgr - pure $ responseBody <$> res + case res of + Left err -> do + putStrLn $ "Error: " <> show err + pure $ Left err + Right response -> do + putStrLn $ "Response: " <> show response + pure $ Right $ responseBody response handleRequest :: Request -> Manager -> IO (Either ApiError (Response LB.ByteString)) handleRequest req mgr = do