class Crm::Errors::InvalidKeys

InvalidKeys is raised if a create or update request contains unknown attributes. @api public

Attributes

validation_errors[R]

Returns the list of validation errors. The items in the list are hashes consisting of a code (always unknown), the invalid attribute name and an English translation (message). @return [Array<Hash{String => String}>] @example

[
  {
    "attribute" => "foo",
    "code" => "unknown",
    "message" => "foo is unknown",
  },
]

@api public

Public Class Methods

new(message = nil, validation_errors = {}) click to toggle source
Calls superclass method
# File lib/crm/errors.rb, line 111
def initialize(message = nil, validation_errors = {})
  super("#{message} #{validation_errors.map{ |h| h['message'] }.to_sentence}.")

  @validation_errors = validation_errors
end