Improve error propegation from rpc to client