rpc exception handle improvement