diff --git a/core/src/main/scalajvm/scalapb/zio_grpc/client/ClientCalls.scala b/core/src/main/scalajvm/scalapb/zio_grpc/client/ClientCalls.scala index 6a777e63..fe843a88 100644 --- a/core/src/main/scalajvm/scalapb/zio_grpc/client/ClientCalls.scala +++ b/core/src/main/scalajvm/scalapb/zio_grpc/client/ClientCalls.scala @@ -116,7 +116,10 @@ object ClientCalls { def exitHandler[Req, Res]( call: ZClientCall[Req, Res] - )(l: Any, ex: Exit[StatusException, Any]) = anyExitHandler(call)(l, ex) + )(l: Any, ex: Exit[StatusException, Any]) = + ZIO.when(!ex.isSuccess) { + anyExitHandler(call)(l, ex) + } // less type safe def anyExitHandler[Req, Res](