Skip to content

Commit

Permalink
Add Errno::ECONNREFUSED to handled exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
spk committed Apr 8, 2017
1 parent e4863c5 commit 057a445
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/w3c_validators/validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def read_local_file(file_path) # :nodoc:
#++
def handle_exception(e, msg = '') # :nodoc:
case e
when Net::HTTPServerException, SocketError
when Net::HTTPServerException, SocketError, Errno::ECONNREFUSED
msg = "unable to connect to the validator at #{@validator_uri} (response was #{e.message})."
raise ValidatorUnavailable, msg, caller
when JSON::ParserError, Nokogiri::XML::SyntaxError
Expand Down

0 comments on commit 057a445

Please sign in to comment.