def humanize_http_exception(error_description)
response = exception.response
case response
when Net::HTTPUnauthorized
describe_401_error(error_description)
when Net::HTTPForbidden
error_description.section("Authorization Error","This client is not authorized to read some of the information required to\naccess its coobooks (HTTP 403).\n\nTo access its cookbooks, a client needs to be able to read its environment and\nall of the cookbooks in its expanded run list.\n")
error_description.section("Expanded Run List:", expanded_run_list_ul)
error_description.section("Server Response:", format_rest_error)
when Net::HTTPPreconditionFailed
describe_412_error(error_description)
when Net::HTTPBadRequest
describe_400_error(error_description)
when Net::HTTPNotFound
when Net::HTTPInternalServerError
describe_500_error(error_description)
when Net::HTTPBadGateway, Net::HTTPServiceUnavailable
describe_503_error(error_description)
else
describe_http_error(error_description)
end
end