Skip to content

Commit 454f533

Browse files
committed
Remove catchServantError
1 parent 80188e0 commit 454f533

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

servant-client-core/src/Servant/Client/Core/Internal/RunClient.hs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ import Servant.Client.Core.Internal.Request (Request, Response, GenRes
2525
ServantError (..))
2626
import Servant.Client.Core.Internal.ClientF
2727

28-
class (Monad m) => RunClient m where
28+
class Monad m => RunClient m where
2929
-- | How to make a request.
3030
runRequest :: Request -> m Response
3131
streamingRequest :: Request -> m StreamingResponse
3232
throwServantError :: ServantError -> m a
33-
catchServantError :: m a -> (ServantError -> m a) -> m a
3433

3534
checkContentTypeHeader :: RunClient m => Response -> m MediaType
3635
checkContentTypeHeader response =
@@ -56,7 +55,3 @@ instance ClientF ~ f => RunClient (Free f) where
5655
runRequest req = liftF (RunRequest req id)
5756
streamingRequest req = liftF (StreamingRequest req id)
5857
throwServantError = liftF . Throw
59-
catchServantError x h = go x where
60-
go (Pure a) = Pure a
61-
go (Free (Throw e)) = h e
62-
go (Free f) = Free (fmap go f)

servant-client-ghcjs/src/Servant/Client/Internal/XhrClient.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ instance Alt ClientM where
7878
instance RunClient ClientM where
7979
runRequest = performRequest
8080
throwServantError = throwError
81-
catchServantError = catchError
8281

8382
instance ClientLike (ClientM a) (ClientM a) where
8483
mkClient = id

servant-client/src/Servant/Client/Internal/HttpClient.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ instance RunClient ClientM where
9696
runRequest = performRequest
9797
streamingRequest = performStreamingRequest
9898
throwServantError = throwError
99-
catchServantError = catchError
10099

101100
instance ClientLike (ClientM a) (ClientM a) where
102101
mkClient = id

0 commit comments

Comments
 (0)