grpc-rust
grpc-rust copied to clipboard
Client recieve diferent error type and message
In Server return a GrpcMessageError to client.
fn send_bulk_encu(
&self,
_m: grpc::RequestOptions,
req: BulkEncu,
) -> grpc::SingleResponse<Empty> {
grpc::SingleResponse::err(grpc::Error::GrpcMessage(grpc::GrpcMessageError {
grpc_status: 2,
grpc_message: String::from("Some custom error msg"),
}))
}
BUT in client, I recieve a Http(CodeError(InternalError)) with message "http error: Encountered HTTP named error"
match client.send_bulk_encu(opt, data).wait_drop_metadata() {
Ok(_) => (),
Err(e) => {
println!("{}",e);
()
}
}