Exception: LoopsSdk::APIError
- Inherits:
-
StandardError
- Object
- StandardError
- LoopsSdk::APIError
- Defined in:
- lib/loops_sdk/base.rb
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(status, body) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(status, body) ⇒ APIError
Returns a new instance of APIError.
45 46 47 48 49 |
# File 'lib/loops_sdk/base.rb', line 45 def initialize(status, body) @status = status @body = body super("API request failed with status #{status}: #{body}") end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
43 44 45 |
# File 'lib/loops_sdk/base.rb', line 43 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
43 44 45 |
# File 'lib/loops_sdk/base.rb', line 43 def status @status end |