Exception: CruFlags::FetchError
- 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
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, code:, status: nil) ⇒ FetchError
constructor
A new instance of FetchError.
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(, code:, status: nil) super() @code = code @status = status end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
11 12 13 |
# File 'lib/cru_flags/errors.rb', line 11 def code @code end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
11 12 13 |
# File 'lib/cru_flags/errors.rb', line 11 def status @status end |