Exception: Octopi::RetryableAPIError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/octopi/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code = nil) ⇒ RetryableAPIError

Returns a new instance of RetryableAPIError.



17
18
19
20
21
# File 'lib/octopi/error.rb', line 17

def initialize(code=nil)
  @code = code.nil? ? '???' : code
  @message = "GitHub returned status #{@code}. Retrying request."
  super @message
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



16
17
18
# File 'lib/octopi/error.rb', line 16

def code
  @code
end