Exception: NexaasID::Client::Exception

Inherits:
StandardError
  • Object
show all
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

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(message, response)
  super(message)
  @response = response
end

Instance Method Details

#bodyInteger



27
28
29
# File 'lib/nexaas_id/client/exception.rb', line 27

def body
  @response ? @response.body : ''
end

#headersInteger



22
23
24
# File 'lib/nexaas_id/client/exception.rb', line 22

def headers
  @response.headers if @response
end

#statusInteger



17
18
19
# File 'lib/nexaas_id/client/exception.rb', line 17

def status
  @response.status if @response
end