Exception: ApiError::ValidationErrors

Inherits:
BadRequest show all
Defined in:
lib/api_error/validation_errors.rb

Overview

Exception thrown for 400 errors with validation error detail

Instance Attribute Summary collapse

Attributes inherited from Http

#code

Instance Method Summary collapse

Constructor Details

#initialize(errors, message = "Validation errors found") ⇒ ValidationErrors



9
10
11
12
# File 'lib/api_error/validation_errors.rb', line 9

def initialize(errors, message = "Validation errors found")
  super(message)
  @errors = errors
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



8
9
10
# File 'lib/api_error/validation_errors.rb', line 8

def errors
  @errors
end