Exception: Dynamoid::Errors::InvalidIndex

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

Overview

InvalidIndex is raised when an invalid index is specified, for example if specified key attribute(s) or projected attributes do not exist.

Instance Method Summary collapse

Constructor Details

#initialize(item) ⇒ InvalidIndex

Returns a new instance of InvalidIndex.



16
17
18
19
20
21
22
# File 'lib/dynamoid/errors.rb', line 16

def initialize(item)
  if item.is_a? String
    super(item)
  else
    super("Validation failed: #{item.errors.full_messages.join(', ')}")
  end
end