Skip to content

Commit

Permalink
Merge pull request #85 from IanLee1521/better-msg-on-download-error
Browse files Browse the repository at this point in the history
Added extra context to error message when remote theme download fails
  • Loading branch information
benbalter authored Feb 19, 2021
2 parents bdcb1fc + 348627d commit a179153
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/jekyll-remote-theme/downloader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion spec/jekyll-remote-theme/downloader_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a179153

Please sign in to comment.