mbr / tinyrpc

A compact, modular transport and protocol agnostic RPC library. Does jsonrpc v2.
https://tinyrpc.readthedocs.org
MIT License
156 stars 53 forks source link

Modify client error handling #58

Closed lnoor closed 6 years ago

lnoor commented 6 years ago

RPCClient._send_and_handle_reply() raises an RPCError based on the contents of the error attribute in the reply message. However the contents of the error reply are not preserved.

Change RPCClient and RPCError so that RPCError contains the error, message and data attributes of the error reply.

Also allow RPCError to correctly propagates through a chain of services.