From 967511ac64f72e50f5d8355a2fcc24ad3ed93aab Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Thu, 13 Jul 2017 10:07:04 +0300 Subject: Alert in more detail on DNS failures. --- lib/custodian/protocoltest/http.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/custodian/protocoltest') diff --git a/lib/custodian/protocoltest/http.rb b/lib/custodian/protocoltest/http.rb index 67b4660..a3f34cc 100644 --- a/lib/custodian/protocoltest/http.rb +++ b/lib/custodian/protocoltest/http.rb @@ -338,7 +338,7 @@ module Custodian errors << "#{protocol_msg}: More than 10 redirections." rescue Curl::Err::HostResolutionError => x # Log the DNS error-message. - resolution_errors << "#{resolve_mode} - #{x.message}" + resolution_errors << "#{protocol_msg}: #{x.class}: #{x.message}\n #{x.backtrace.join("\n ")}." rescue => x errors << "#{protocol_msg}: #{x.class}: #{x.message}\n #{x.backtrace.join("\n ")}." end @@ -359,7 +359,7 @@ module Custodian end # uh-oh! Resolution failed on both protocols! - if resolution_errors.length > 0 + if resolution_errors.length > 1 errors << "DNS Error when resolving host - #{resolution_errors.join(',')}" end -- cgit v1.2.1