Exception: Unloq::APIError
- Inherits:
-
StandardError
- Object
- StandardError
- Unloq::APIError
- Defined in:
- lib/unloq/api_error.rb
Direct Known Subclasses
Defined Under Namespace
Classes: NotFoundError
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.
- #message ⇒ Object
Constructor Details
#initialize(status, body) ⇒ APIError
Returns a new instance of APIError.
6 7 8 9 10 |
# File 'lib/unloq/api_error.rb', line 6 def initialize(status, body) @status = status @body = body super() end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
4 5 6 |
# File 'lib/unloq/api_error.rb', line 4 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/unloq/api_error.rb', line 4 def status @status end |
Instance Method Details
#message ⇒ Object
12 13 14 |
# File 'lib/unloq/api_error.rb', line 12 def "status_code:#{status} body:#{body.inspect}" end |