Exception: NexaasID::Client::Exception
- Inherits:
-
StandardError
- Object
- StandardError
- NexaasID::Client::Exception
- Defined in:
- lib/nexaas_id/client/exception.rb
Overview
Exception class raised whenever the underlying client receives an error response.
- API
-
Documentation:
Instance Method Summary collapse
-
#body ⇒ Integer
HTTP response’s body.
-
#headers ⇒ Integer
HTTP response’s headers.
-
#initialize(message, response) ⇒ Exception
constructor
Creates an instance of this exception.
-
#status ⇒ Integer
HTTP response’s status.
Constructor Details
#initialize(message, response) ⇒ Exception
Creates an instance of this exception.
11 12 13 14 |
# File 'lib/nexaas_id/client/exception.rb', line 11 def initialize(, response) super() @response = response end |
Instance Method Details
#body ⇒ Integer
Returns HTTP response’s body.
27 28 29 |
# File 'lib/nexaas_id/client/exception.rb', line 27 def body @response ? @response.body : '' end |
#headers ⇒ Integer
Returns HTTP response’s headers.
22 23 24 |
# File 'lib/nexaas_id/client/exception.rb', line 22 def headers @response.headers if @response end |
#status ⇒ Integer
Returns HTTP response’s status.
17 18 19 |
# File 'lib/nexaas_id/client/exception.rb', line 17 def status @response.status if @response end |