I am having problems with error reporting while implementing a java grpc server with the beta API.
I have modified the HelloWorldServer java example in the following way for illustration purposes:
Is there something wrong with the way I am handling errors server side? What is the proper way to handle errors?
For reference, here are the stack traces of both the python and java client, where you can see the Exception message is nowhere to be seen.
Oct 22, 2015 3:24:54 PM com.example.HelloWorldClient greet
INFO: Will try to greet world ...
Oct 22, 2015 3:24:54 PM com.example.HelloWorldClient greet
WARNING: RPC failed
io.grpc.StatusRuntimeException: UNKNOWN
at io.grpc.Status.asRuntimeException(Status.java:430)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:156)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:106)
at com.example.helloworld.GreeterGrpc$GreeterBlockingStub.sayHello(GreeterGrpc.java:109)
at com.example.HelloWorldClient.greet(HelloWorldClient.java:69)
at com.example.HelloWorldClient.main(HelloWorldClient.java:89)
Traceback (most recent call last):
File "./.bootstrap/_pex/pex.py", line 271, in execute
File "./.bootstrap/_pex/pex.py", line 320, in execute_entry
File "./.bootstrap/_pex/pex.py", line 337, in execute_module
File "/usr/lib/python2.7/runpy.py", line 180, in run_module
fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "./pex_main.py", line 72, in <module>
File "/usr/lib/python2.7/runpy.py", line 180, in run_module
fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/lorenzo/Projects/core/plz-out/bin/experimental/lorenzo/grpc_test/src/main/python/com/example/helloworld_client_bin.pex/experimental/lorenzo/grpc_test/src/main/python/com/example/helloworld_client.py", line 11, in <module>
File "/home/lorenzo/Projects/core/plz-out/gen/third_party/python/grpc/framework/crust/implementations.py", line 73, in __call__
protocol_options, metadata, request)
File "/home/lorenzo/Projects/core/plz-out/gen/third_party/python/grpc/framework/crust/_calls.py", line 109, in blocking_unary_unary
return next(rendezvous)
File "/home/lorenzo/Projects/core/plz-out/gen/third_party/python/grpc/framework/crust/_control.py", line 412, in next
raise self._termination.abortion_error
third_party.python.grpc.framework.interfaces.face.face.RemoteError