Exception: Terminal::APIResponseError
- Inherits:
-
StandardError
- Object
- StandardError
- Terminal::APIResponseError
- Defined in:
- lib/terminal/errors.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ APIResponseError
constructor
A new instance of APIResponseError.
Constructor Details
#initialize(response) ⇒ APIResponseError
Returns a new instance of APIResponseError.
8 9 10 11 12 |
# File 'lib/terminal/errors.rb', line 8 def initialize(response) @response = response @message = @response.body.nil? ? '' : @response.body['error'] super() end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
7 8 9 |
# File 'lib/terminal/errors.rb', line 7 def @message end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
7 8 9 |
# File 'lib/terminal/errors.rb', line 7 def response @response end |