Method: Chef::Formatters::ErrorInspectors::NodeLoadErrorInspector#describe_404_error

Defined in:
lib/chef/formatters/error_inspectors/node_load_error_inspector.rb

#describe_404_error(error_description) ⇒ Object

Custom 404 error messaging. Users sometimes see 404s when they have misconfigured server URLs, and the wrong one redirects to the new one, e.g., PUT wrong.url/nodes/node-name becomes a GET after a redirect.



100
101
102
103
104
105
106
107
# File 'lib/chef/formatters/error_inspectors/node_load_error_inspector.rb', line 100

def describe_404_error(error_description)
  error_description.section("Resource Not Found:", <<~E)
    The #{ChefUtils::Dist::Server::PRODUCT} returned a HTTP 404. This usually indicates that your chef_server_url is incorrect.
  E
  error_description.section("Relevant Config Settings:", <<~E)
    chef_server_url "#{server_url}"
  E
end