From d397170f3432faaa182266b917beaac1234a65a6 Mon Sep 17 00:00:00 2001 From: Ian Lee Date: Thu, 18 Feb 2021 01:16:47 -0800 Subject: [PATCH 1/2] Added extra context to error message when remote theme download fails --- lib/jekyll-remote-theme/downloader.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll-remote-theme/downloader.rb b/lib/jekyll-remote-theme/downloader.rb index a1a4f6c..09f171a 100644 --- a/lib/jekyll-remote-theme/downloader.rb +++ b/lib/jekyll-remote-theme/downloader.rb @@ -64,7 +64,7 @@ def request def raise_unless_sucess(response) return if response.is_a?(Net::HTTPSuccess) - raise DownloadError, "#{response.code} - #{response.message}" + raise DownloadError, "#{response.code} - #{response.message} - Loading URL: #{zip_url}" end def enforce_max_file_size(size) From 348627d4a1d56f52f24cb18f73cf7158978c11db Mon Sep 17 00:00:00 2001 From: Ian Lee Date: Thu, 18 Feb 2021 23:37:56 -0800 Subject: [PATCH 2/2] Updated 404 message in test case --- spec/jekyll-remote-theme/downloader_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/jekyll-remote-theme/downloader_spec.rb b/spec/jekyll-remote-theme/downloader_spec.rb index 2805448..a653957 100644 --- a/spec/jekyll-remote-theme/downloader_spec.rb +++ b/spec/jekyll-remote-theme/downloader_spec.rb @@ -69,7 +69,7 @@ after { WebMock.allow_net_connect! } it "raises a DownloadError" do - msg = "404 - Not Found" + msg = "404 - Not Found - Loading URL: https://codeload.github.com/benbalter/_invalid_/zip/master" expect { subject.run }.to raise_error(Jekyll::RemoteTheme::DownloadError, msg) end end