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","Your client is not authorized to load the node data (HTTP 403).\n")
error_description.section("Server Response:", format_rest_error)
error_description.section("Possible Causes:","* Your client (\#{username}) may have misconfigured authorization permissions.\n")
when Net::HTTPBadRequest
describe_400_error(error_description)
when Net::HTTPNotFound
describe_404_error(error_description)
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