Exception: Hubspot::RequestError
- Defined in:
- lib/hubspot/exceptions.rb
Overview
define the Hubspot specific error classes
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response, message = nil) ⇒ RequestError
constructor
A new instance of RequestError.
Constructor Details
#initialize(response, message = nil) ⇒ RequestError
Returns a new instance of RequestError.
9 10 11 12 13 14 15 16 |
# File 'lib/hubspot/exceptions.rb', line 9 def initialize(response, = nil) if ! && response.respond_to?(:parsed_response) = response.parsed_response['message'] end += "\n" if me = super("#{message}Response body: #{response.body}",) me.response = response end |
Instance Attribute Details
#response ⇒ Object
Returns the value of attribute response.
7 8 9 |
# File 'lib/hubspot/exceptions.rb', line 7 def response @response end |