Exception: Grape::Exceptions::ValidationArrayErrors

Inherits:
Base
  • Object
show all
Defined in:
lib/grape/exceptions/validation_array_errors.rb

Constant Summary collapse

EMPTY_BACKTRACE =
[].freeze

Constants inherited from Base

Base::MESSAGE_STEPS

Instance Attribute Summary collapse

Attributes inherited from Base

#headers, #status

Instance Method Summary collapse

Methods inherited from Base

#[]

Constructor Details

#initialize(errors) ⇒ ValidationArrayErrors

Returns a new instance of ValidationArrayErrors.



10
11
12
13
14
15
# File 'lib/grape/exceptions/validation_array_errors.rb', line 10

def initialize(errors)
  super()
  @errors = errors
  # Skip backtrace capture — see Grape::Exceptions::Validation for rationale.
  set_backtrace(EMPTY_BACKTRACE)
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



8
9
10
# File 'lib/grape/exceptions/validation_array_errors.rb', line 8

def errors
  @errors
end