From f43163b9b781a2ccc300a7215e948a352a96e341 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 5 Oct 2013 20:57:03 -0400 Subject: [PATCH] Error handling FTW --- plugins/gist_tag.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/gist_tag.rb b/plugins/gist_tag.rb index f5123cb..0828d27 100644 --- a/plugins/gist_tag.rb +++ b/plugins/gist_tag.rb @@ -88,6 +88,9 @@ module Jekyll def handle_gist_redirecting(data) 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) end