Exception: Amply::Exceptions::ResourceNotFoundException

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ResourceNotFoundException

Returns a new instance of ResourceNotFoundException.



8
9
10
11
12
# File 'lib/amply/exceptions/resource_not_found_exception.rb', line 8

def initialize(response)
  @errors = JSON.parse(response.body, symbolize_names: true)[:errors]

  super
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



6
7
8
# File 'lib/amply/exceptions/resource_not_found_exception.rb', line 6

def errors
  @errors
end

Instance Method Details

#messageObject



14
15
16
# File 'lib/amply/exceptions/resource_not_found_exception.rb', line 14

def message
  'The resource was not found while making an API request'
end