    # File lib/chef/knife/cookbook_delete.rb, line 87
          def available_versions
            @available_versions ||= rest.get_rest("cookbooks/#{@cookbook_name}").map do |name, url_and_version|
              url_and_version["versions"].map {|url_by_version| url_by_version["version"]}
            end.flatten
          rescue Net::HTTPServerException => e
            if e.to_s =~ /^404/
              ui.error("Cannot find a cookbook named #{@cookbook_name} to delete")
              nil
            else
              raise
            end
          end