@@ -53,7 +53,7 @@ data ServantError
5353 , responseBody :: ByteString
5454 }
5555 | ConnectionError
56− { connectionError :: String
56+ { connectionError :: SomeException
5757 }
5858 deriving (Show, Typeable)
5959
@@ -156,7 +156,7 @@ performRequest reqMethod req isWantedStatus reqHost = do
156156 Client.httpLbs request manager
157157 case eResponse of
158158 Left err ->
159− left $ ConnectionError (show err)
159+ left . ConnectionError $ SomeException err
160160
161161 Right response -> do
162162 let status = Client.responseStatus response
@@ -192,4 +192,4 @@ performRequestNoBody reqMethod req wantedStatus reqHost = do
192192catchConnectionError :: IO a -> IO (Either ServantError a)
193193catchConnectionError action =
194194 catch (Right <$> action) $ \e ->
195− pure . Left . ConnectionError . show $ (e :: HttpException)
195+ pure . Left . ConnectionError $ SomeException (e :: HttpException)