Exception: Kidspire::PcoApiError
- Defined in:
- lib/kidspire/errors.rb
Overview
non-2xx from PCO API
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(msg = nil, status: nil, body: nil) ⇒ PcoApiError
constructor
A new instance of PcoApiError.
Constructor Details
#initialize(msg = nil, status: nil, body: nil) ⇒ PcoApiError
Returns a new instance of PcoApiError.
7 8 9 10 11 |
# File 'lib/kidspire/errors.rb', line 7 def initialize(msg = nil, status: nil, body: nil) @status = status @body = body super(msg || "PCO API error (#{status})") end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'lib/kidspire/errors.rb', line 6 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/kidspire/errors.rb', line 6 def status @status end |