Browse files

Add RetryableAPIError.

If GitHub responds with an error that implies the request would succeed if we
simply repeated it, we raise a RetryableAPIError.
  • Loading branch information...
1 parent a37a352 commit 7b3b8fc98339bd0f47f574ecd7e24f1f141b070e @runpaint committed Apr 25, 2009
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/octopi/error.rb
View
6 lib/octopi/error.rb
@@ -12,4 +12,10 @@ def initialize(m)
end
end
+ class RetryableAPIError < RuntimeError
+ def initalize(status=nil)
+ $stderr.puts "GitHub returned status #{status.nil? ? '???' : status}. Retrying request."
+ end
+ end
+
end

0 comments on commit 7b3b8fc

Please sign in to comment.