diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-12-07 11:15:23 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-01-03 10:53:48 -0800 |
commit | 10db9b3a50eae9c4c966f39f5beca8f5c17d441e (patch) | |
tree | 596bb3da0bcd1e2fe9a24e3a376fd6223cb6156f /lib/chef/formatters | |
parent | 94ba9c022e57feb2949e22656d811a843b3410f1 (diff) | |
download | chef-10db9b3a50eae9c4c966f39f5beca8f5c17d441e.tar.gz |
change HTTPServerException to HTTPClientException for ruby 2.6
includes backcompat for 2.5
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/formatters')
5 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb b/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb index a046f1a277..e87ef0da70 100644 --- a/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb +++ b/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb @@ -35,7 +35,7 @@ class Chef def add_explanation(error_description) case exception - when Net::HTTPServerException, Net::HTTPFatalError + when Net::HTTPClientException, Net::HTTPFatalError humanize_http_exception(error_description) when EOFError describe_eof_error(error_description) diff --git a/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb b/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb index 3bd9b419fa..6ab2816a57 100644 --- a/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb +++ b/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb @@ -41,7 +41,7 @@ class Chef def add_explanation(error_description) case exception - when Net::HTTPServerException, Net::HTTPFatalError + when Net::HTTPClientException, Net::HTTPFatalError humanize_http_exception(error_description) when EOFError describe_eof_error(error_description) diff --git a/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb b/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb index a2f77c8287..7b2ccf0d9a 100644 --- a/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb +++ b/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb @@ -40,7 +40,7 @@ class Chef def add_explanation(error_description) case exception - when Net::HTTPServerException, Net::HTTPFatalError + when Net::HTTPClientException, Net::HTTPFatalError humanize_http_exception(error_description) when Chef::Exceptions::PrivateKeyMissing error_description.section("Private Key Not Found:", <<~E) diff --git a/lib/chef/formatters/error_inspectors/registration_error_inspector.rb b/lib/chef/formatters/error_inspectors/registration_error_inspector.rb index 02e8b0d61a..4ca08ca120 100644 --- a/lib/chef/formatters/error_inspectors/registration_error_inspector.rb +++ b/lib/chef/formatters/error_inspectors/registration_error_inspector.rb @@ -23,7 +23,7 @@ class Chef def add_explanation(error_description) case exception - when Net::HTTPServerException, Net::HTTPFatalError + when Net::HTTPClientException, Net::HTTPFatalError humanize_http_exception(error_description) when Errno::ECONNREFUSED, Timeout::Error, Errno::ETIMEDOUT, SocketError error_description.section("Network Error:", <<~E) diff --git a/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb b/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb index 9d46465947..ac7304df13 100644 --- a/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb +++ b/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb @@ -41,7 +41,7 @@ class Chef Your chef_server_url may be misconfigured, or the network could be down. E - when Net::HTTPServerException, Net::HTTPFatalError + when Net::HTTPClientException, Net::HTTPFatalError humanize_http_exception(error_description) when Chef::Exceptions::MissingRole describe_missing_role(error_description) |