-
Notifications
You must be signed in to change notification settings - Fork 3.9k
blocking v2 client stub inconsistent about StatusRuntimeException verus StatusException #11937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The reason that we started using the checked exception is that we want to start moving in general to StatusException rather than StatusRuntimeException and the read/write methods in the |
I'm just curious why this "blocking v2" interface is inconsistent. If the goal is to move to |
The commit that introduced Can you clarify what are the other blocking methods in the v2 interface you are referring to that don't throw |
As the OP says, unary methods on the v2 interface use the same implementation as the v1 interface and therefore report errors with |
Figured you are asking not to make the already stable ClientCalls.blockingUnaryCall throw StatusException but why not make the new wrapper stub (this is what is v2)'s unaryRpc method catch and convert StatusRuntimeException to StatusException.
|
We could make a new ClientCalls.blockingV2UnaryCall() that throws the checked StatusException. |
Makes sense to me. |
io.grpc.stub.BlockingClientCall
uses the checkedStatusException
, so server-streaming and client-streaming v2 blocking RPCs have to deal withStatusException
. However, the unary blocking v2 RPCs stubs have the implementation and thus behavior as v1; namely, all status exceptions areStatusRuntimeException
. Should this be made consistent?The text was updated successfully, but these errors were encountered: