Exception: Crowdkit::ValidationError

Inherits:
UserError show all
Defined in:
lib/crowdkit/error.rb

Instance Method Summary collapse

Methods inherited from UserError

#generate_message

Constructor Details

#initialize(errors) ⇒ ValidationError

Returns a new instance of ValidationError.



26
27
28
29
30
31
32
33
34
# File 'lib/crowdkit/error.rb', line 26

def initialize(errors)
  super(
    generate_message(
      :problem => "Attempted to send request with nil arguments for #{errors.keys.join(', ')}.",
      :summary => 'Each request expects certain number of required arguments.',
      :resolution => 'Double check that the provided arguments are set to some value that is neither nil nor empty string.'
    )
  )
end