sdeo / protobuf-socket-rpc

Java and Python protobuf rpc implementation using tcp/ip sockets.
MIT License
59 stars 31 forks source link

Exceptions on server not propogated to client #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Using python client side code...
Create an rpc method whose server side code throws an exception
resulting in a call to Controller.handleError on the client side.
Make a synchronous call to the rpc method that fails.

What is the expected output? What do you see instead?

I expect to see the value of controller.error raised on the client side.
Instead, I get an error saying that the response object was not initialized

Original issue reported on code.google.com by walker.z...@gmail.com on 25 Jan 2010 at 6:29

GoogleCodeExporter commented 9 years ago
Actually, no error is propagated at all. Even on client side.

To reproduce: Make a MyService with a MyRequest. Add a mandatory field to the 
MyRequest and do not fill it. This makes the MyRequest not initialized. Then 
'do' the MyRequest. Nothing is send to the server. No error is detectable, not 
even a warning message. The result is just None. This will become a heck of 
search if you forget to fill in a mandatory field in a big project: you just 
wont get a result. The only way I found out that the request initialisation was 
the problem is by manually creating the service, channel and controller and 
then checking the controller. This is however not done in RpcService.

As it seems to me now: No error, wherever occuring client or server, whatever 
error, it is not reported. 

I'm trying to implement this in RpcService now. But I'm not sure if it works 
out. Might post a diff if interested.

Original comment by knifter@gmail.com on 15 Aug 2012 at 10:42