Exception: MetalArchives::Errors::APIError
- Defined in:
- lib/metal_archives/errors.rb
Overview
Error in backend response
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(response) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(response) ⇒ APIError
Returns a new instance of APIError.
38 39 40 41 42 |
# File 'lib/metal_archives/errors.rb', line 38 def initialize(response) super("#{response.reason}: #{response.body}") @code = response.code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
36 37 38 |
# File 'lib/metal_archives/errors.rb', line 36 def code @code end |