aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorParker Moore <parkrmoore@gmail.com>2013-10-05 20:57:03 -0400
committerParker Moore <parkrmoore@gmail.com>2013-10-05 20:57:03 -0400
commitf43163b9b781a2ccc300a7215e948a352a96e341 (patch)
tree5cf9c61346ddb5555ebb201976d703eac6c987fd /plugins
parente692d8ea1a242e385bfcbd49e28d8b4fd9392661 (diff)
downloadmy_new_personal_website-f43163b9b781a2ccc300a7215e948a352a96e341.tar.xz
my_new_personal_website-f43163b9b781a2ccc300a7215e948a352a96e341.zip
Error handling FTW
Diffstat (limited to '')
-rw-r--r--plugins/gist_tag.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/gist_tag.rb b/plugins/gist_tag.rb
index f5123cb9..0828d270 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