Commit 2580620f authored by Stan Hu's avatar Stan Hu

Merge branch 'sh-fix-geo-iat-return-value' into 'master'

Fix return value when Geo nodes are not in sync

See merge request !1969
parents 3d4fc3dd fc2b346c
......@@ -42,6 +42,7 @@ module Gitlab
data
rescue JWT::DecodeError => e
Rails.logger.error("Error decoding Geo request: #{e}")
return
end
end
......
......@@ -26,5 +26,11 @@ describe Gitlab::Geo::JwtRequestDecoder do
primary_node.save
expect(described_class.new(data).decode).to be_nil
end
it 'returns nil when clocks are not in sync' do
allow(JWT).to receive(:decode).and_raise(JWT::InvalidIatError)
expect(subject.decode).to be_nil
end
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