Skip to content

Commit

Permalink
also treat IOError as a failure to connect
Browse files Browse the repository at this point in the history
  • Loading branch information
jambun committed Jun 20, 2024
1 parent ca97764 commit bd41e5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/model/reftracker_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def self.get(uri, params = {})
url.query = URI.encode_www_form(params) unless params.empty?
Net::HTTP.get(url)
rescue => e
if e.class == SocketError
if [SocketError, IOError].include?(e.class)
raise ReftrackerAPIException.new('Failed to connect to RefTracker')
else
raise ReftrackerAPIException.new(e.message)
Expand Down

0 comments on commit bd41e5f

Please sign in to comment.