Method: Bandwidth::GenericClientException#initialize

Defined in:
lib/bandwidth/messaging_lib/messaging/exceptions/generic_client_exception.rb

#initialize(reason, response) ⇒ GenericClientException

The constructor.

Parameters:

  • The (String)

    reason for raising an exception.

  • The (HttpResponse)

    HttpReponse of the API call.



24
25
26
27
28
# File 'lib/bandwidth/messaging_lib/messaging/exceptions/generic_client_exception.rb', line 24

def initialize(reason, response)
  super(reason, response)
  hash = APIHelper.json_deserialize(@response.raw_body)
  unbox(hash)
end