Commit b6db9817 authored by Ash McKenzie's avatar Ash McKenzie

Improve exception message when not a secondary

parent 3c7e94f4
......@@ -93,7 +93,7 @@ module Gitlab
end
def ensure_secondary!
raise MustBeASecondaryNode, 'Node is not a secondary' unless Gitlab::Geo.secondary_with_primary?
raise MustBeASecondaryNode, 'Node is not a secondary or there is no primary Geo node' unless Gitlab::Geo.secondary_with_primary?
end
end
end
......
......@@ -49,7 +49,7 @@ describe Gitlab::Geo::GitPushSSHProxy, :geo do
it 'raises an exception' do
expect do
subject.info_refs
end.to raise_error(described_class::MustBeASecondaryNode)
end.to raise_error(described_class::MustBeASecondaryNode, 'Node is not a secondary or there is no primary Geo node')
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment