Exception: CruFlags::FetchError

Inherits:
Error
  • Object
show all
Defined in:
lib/cru_flags/errors.rb

Overview

Normalized fetch failure. code is :http, :network, :timeout, or :parse; status is set only for :http.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code:, status: nil) ⇒ FetchError

Returns a new instance of FetchError.



13
14
15
16
17
# File 'lib/cru_flags/errors.rb', line 13

def initialize(message, code:, status: nil)
  super(message)
  @code = code
  @status = status
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



11
12
13
# File 'lib/cru_flags/errors.rb', line 11

def code
  @code
end

#statusObject (readonly)

Returns the value of attribute status.



11
12
13
# File 'lib/cru_flags/errors.rb', line 11

def status
  @status
end