Handle result in rpc calls