def fetch_body(self, name):
        config = json.loads(self.request.body.decode('utf-8'))
        if "cmd" not in config:
            raise ValueError("invalid process config")

        if 'name' in config:
            if config.get('name') != name:
                raise ValueError("template name conflict with the path")

            del config['name']

        cmd = config.pop("cmd")
        return cmd, config
dataset/ETHPy150Open benoitc/gaffer/gaffer/gafferd/http_handlers/jobs.py/JobHandler.fetch_body/original