diff --git a/cartridge/failover.lua b/cartridge/failover.lua index fcb1f3fe9..d908c3f0b 100644 --- a/cartridge/failover.lua +++ b/cartridge/failover.lua @@ -432,7 +432,7 @@ local function synchro_promote() local ok, err = pcall(box.ctl.promote) fiber.testcancel() if ok ~= true then - log.error('Failed to promote: %s', err) + log.error('Failed to promote: %s', err or 'unknown') end return err end @@ -448,7 +448,7 @@ local function synchro_demote() local ok, err = pcall(box.ctl.demote) fiber.testcancel() if ok ~= true then - log.error('Failed to demote: %s', err) + log.error('Failed to demote: %s', err or 'unknown') end return err end diff --git a/cartridge/failover/raft.lua b/cartridge/failover/raft.lua index 37f2dbe18..a1b4570e4 100644 --- a/cartridge/failover/raft.lua +++ b/cartridge/failover/raft.lua @@ -150,9 +150,9 @@ local function disable() and box_info.synchro.queue ~= nil and box_info.synchro.queue.owner ~= 0 and box_info.synchro.queue.owner == box_info.id then - local err = pcall(box.ctl.demote) - if err ~= nil then - log.error('Failed to demote: %s', err) + local ok, err = pcall(box.ctl.demote) + if ok ~= true then + log.error('Failed to demote: %s', err or 'unknown') end return err end