minor refactor to record_rpc_response