Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 7b3b8fc98339bd0f47f574ecd7e24f1f141b070e 1 parent a37a352
@runpaint authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.