Exception: InContactClient::Error
- Inherits:
-
StandardError
- Object
- StandardError
- InContactClient::Error
- Defined in:
- lib/incontact_client/error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(exception, response = nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(exception, response = nil) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/incontact_client/error.rb', line 5 def initialize(exception, response = nil) @response = response if exception.instance_of? Faraday::Error::ClientError super exception. elsif exception.is_a? String super exception else super "Unknown exception: #{exception.}" end end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/incontact_client/error.rb', line 3 def response @response end |