Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard.
Motivation:
When an exception is raised, GrpcService creates a new Status from Status.getCause() via GrpcExceptionHandlerFunction. This can result in sending an incorrect status in certain situations:
If the original exception is a StatusRuntimeException containing the Status that the user wants to send.
Motivation: When an exception is raised,
GrpcService
creates a newStatus
fromStatus.getCause()
viaGrpcExceptionHandlerFunction
. This can result in sending an incorrect status in certain situations:StatusRuntimeException
containing theStatus
that the user wants to send.Status
viaStatus.fromThrowable()
: https://github.com/grpc/grpc-java/blob/5770114d08dcd352f2288ef52d17e1833530323c/stub/src/main/java/io/grpc/stub/ServerCalls.java#L389Status
is ignored and a new, potentially incorrectStatus
is created byGrpcExceptionHandlerFunction
and sent.Modifications:
Status
parameter to theGrpcExceptionHandlerFunction.apply()
method.GrpcExceptionHandlerFunction.of()
to return the providedStatus
if it is not an unknown status.Result:
GrpcExceptionHandlerFunction
now properly handles and returns the correctStatus
.apply
method ofGrpcExceptionHandlerFunction
now takes aStatus
.