diff --git a/crud/common/utils.lua b/crud/common/utils.lua index 46f0f643..3a8478d1 100644 --- a/crud/common/utils.lua +++ b/crud/common/utils.lua @@ -97,6 +97,12 @@ end function utils.get_space(space_name, replicasets) local replicaset = select(2, next(replicasets)) + + if replicaset.master.conn.error ~= nil then + local error_msg = string.format('The connection to the master is not valid: %s', + replicaset.master.conn.error) + error(error_msg) + end local space = replicaset.master.conn.space[space_name] return space