eclipse-vertx / vertx-grpc

Development of the gRPC component for Eclipse Vert.x
Eclipse Public License 2.0
43 stars 23 forks source link

Avoid masking invalid grpc status errors in GrpcClientResponse#last() #116

Closed vietj closed 6 days ago

vietj commented 6 days ago

Motivation

The current handling of some futures of GrpcClientResponse will map the end future to a failure when the status is not OK with a mere message error.

We can instead more precisely handle it by providing a custom exception.

Changes

Introduce InvalidStateException and use an expectation to map an invalid status to such exception