Skip to content

Commit a5d65cf

Browse files
committed
So it turns out when you are offline an SocketError will be raised and when the response is an 404 an HTTPError will be raised. Rescue both of them now.
1 parent 93e91fa commit a5d65cf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/jekyll-gist/gist_tag.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ def fetch_raw_code(gist_id, filename = nil)
6666
open(uri).read.chomp
6767
rescue SocketError
6868
nil
69+
rescue OpenURI::HTTPError
70+
nil
6971
end
7072
end
7173
end

0 commit comments

Comments
 (0)