Error handling FTW
This commit is contained in:
parent
e692d8ea1a
commit
f43163b9b7
@ -88,6 +88,9 @@ module Jekyll
|
|||||||
|
|
||||||
def handle_gist_redirecting(data)
|
def handle_gist_redirecting(data)
|
||||||
redirected_url = data.header['Location']
|
redirected_url = data.header['Location']
|
||||||
|
if redirected_url.nil? || redirected_url.empty?
|
||||||
|
raise ArgumentError, "GitHub replied with a 302 but didn't provide a location in the response headers."
|
||||||
|
end
|
||||||
get_web_content(redirected_url)
|
get_web_content(redirected_url)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user