def METHOD_NAME(*args, **kwargs):
    try:
        return method(*args, **kwargs)
    except osparc.exceptions.ApiException as e:
        args[0]._api_client.close()
        expt = json.loads(e.body)
        raise osparc_server_exception("\n".join(expt["errors"])) from None