Exception: Pebbles::API::Errors::ErrorWithResponse

Inherits:
Error
  • Object
show all
Defined in:
lib/pebbles/api/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, response) ⇒ ErrorWithResponse

Returns a new instance of ErrorWithResponse.



9
10
11
12
13
# File 'lib/pebbles/api/errors.rb', line 9

def initialize(message, response)
  message = message << "\nbody: #{response.body.inspect}"
  super message
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



7
8
9
# File 'lib/pebbles/api/errors.rb', line 7

def response
  @response
end