Exception: Hubspot::RequestError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/hubspot/exceptions.rb

Direct Known Subclasses

ContactExistsError, NotFoundError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response, message = nil) ⇒ RequestError

Returns a new instance of RequestError.



5
6
7
8
9
10
# File 'lib/hubspot/exceptions.rb', line 5

def initialize(response, message=nil)
  message += "\n" if message
  me = super("#{message}Response body: #{response.body}",)
  me.response = response
  return me
end

Instance Attribute Details

#responseObject

Returns the value of attribute response.



3
4
5
# File 'lib/hubspot/exceptions.rb', line 3

def response
  @response
end