    # File lib/chef/knife.rb, line 420
        def humanize_http_exception(e)
          response = e.response
          case response
          when Net::HTTPUnauthorized
            ui.error "Failed to authenticate to #{server_url} as #{username} with key #{api_key}"
            ui.info "Response:  #{format_rest_error(response)}"
          when Net::HTTPForbidden
            ui.error "You authenticated successfully to #{server_url} as #{username} but you are not authorized for this action"
            ui.info "Response:  #{format_rest_error(response)}"
          when Net::HTTPBadRequest
            ui.error "The data in your request was invalid"
            ui.info "Response: #{format_rest_error(response)}"
          when Net::HTTPNotFound
            ui.error "The object you are looking for could not be found"
            ui.info "Response: #{format_rest_error(response)}"
          when Net::HTTPInternalServerError
            ui.error "internal server error"
            ui.info "Response: #{format_rest_error(response)}"
          when Net::HTTPBadGateway
            ui.error "bad gateway"
            ui.info "Response: #{format_rest_error(response)}"
          when Net::HTTPServiceUnavailable
            ui.error "Service temporarily unavailable"
            ui.info "Response: #{format_rest_error(response)}"
          else
            ui.error response.message
            ui.info "Response: #{format_rest_error(response)}"
          end
        end