I have a huge proto file, and I used grpc-rust to generate the server and client code, which used ServerResponseUnarySink to send response. I use the send_grpc_error method of ServerResponseUnarySink to send GrpcStatus error code to the client. But the client cannot recognize the error code, no matter what the error code is, the client read all GrpcStatus error code as GrpcStatus::Unknown.
Hi all,
I have a huge proto file, and I used
grpc-rust
to generate the server and client code, which usedServerResponseUnarySink
to send response. I use thesend_grpc_error
method ofServerResponseUnarySink
to sendGrpcStatus
error code to the client. But the client cannot recognize the error code, no matter what the error code is, the client read allGrpcStatus
error code asGrpcStatus::Unknown
.Here is how I send error code:
Here is the proto snippet:
Am I sending the
GrpcStatus
error code in the right way? BTW, why notgrpc-rust
generated server and client code usingSingleResponse
?Thanks!