diff options
Diffstat (limited to 'lib/chef/formatters/error_inspectors/node_load_error_inspector.rb')
-rw-r--r-- | lib/chef/formatters/error_inspectors/node_load_error_inspector.rb | 15 |
1 files changed, 7 insertions, 8 deletions
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 b3196caddb..c52dad4c09 100644 --- a/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb +++ b/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb @@ -22,7 +22,6 @@ class Chef module Formatters module ErrorInspectors - # == APIErrorInspector # Wraps exceptions caused by API calls to the server. class NodeLoadErrorInspector @@ -44,11 +43,11 @@ class Chef when Net::HTTPServerException, Net::HTTPFatalError humanize_http_exception(error_description) when Chef::Exceptions::PrivateKeyMissing - error_description.section("Private Key Not Found:",<<-E) + error_description.section("Private Key Not Found:", <<-E) Your private key could not be loaded. If the key file exists, ensure that it is readable by chef-client. E - error_description.section("Relevant Config Settings:",<<-E) + error_description.section("Relevant Config Settings:", <<-E) client_key "#{api_key}" E when EOFError @@ -56,7 +55,7 @@ E when *NETWORK_ERROR_CLASSES describe_network_errors(error_description) else - error_description.section("Unexpected Error:","#{exception.class.name}: #{exception.message}") + error_description.section("Unexpected Error:", "#{exception.class.name}: #{exception.message}") end end @@ -70,12 +69,12 @@ E # TODO: we're rescuing errors from Node.find_or_create # * could be no write on nodes container # * could be no read on the node - error_description.section("Authorization Error",<<-E) + error_description.section("Authorization Error", <<-E) Your client is not authorized to load the node data (HTTP 403). E error_description.section("Server Response:", format_rest_error) - error_description.section("Possible Causes:",<<-E) + error_description.section("Possible Causes:", <<-E) * Your client (#{username}) may have misconfigured authorization permissions. E when Net::HTTPBadRequest @@ -98,10 +97,10 @@ E # one, e.g., PUT http://wrong.url/nodes/node-name becomes a GET after a # redirect. def describe_404_error(error_description) - error_description.section("Resource Not Found:",<<-E) + error_description.section("Resource Not Found:", <<-E) The server returned a HTTP 404. This usually indicates that your chef_server_url is incorrect. E - error_description.section("Relevant Config Settings:",<<-E) + error_description.section("Relevant Config Settings:", <<-E) chef_server_url "#{server_url}" E end |