Exception: JSONAPI::Exceptions::Errors

Inherits:
Error
  • Object
show all
Defined in:
lib/jsonapi/exceptions.rb

Instance Attribute Summary

Attributes inherited from Error

#error_object_overrides

Instance Method Summary collapse

Methods inherited from Error

#create_error_object

Constructor Details

#initialize(errors, error_object_overrides = {}) ⇒ Errors

Returns a new instance of Errors.



22
23
24
25
26
27
28
29
30
# File 'lib/jsonapi/exceptions.rb', line 22

def initialize(errors, error_object_overrides = {})
  @errors = errors

  @errors.each do |error|
    error.update_with_overrides(error_object_overrides)
  end

  super(error_object_overrides)
end

Instance Method Details

#errorsObject



32
33
34
# File 'lib/jsonapi/exceptions.rb', line 32

def errors
  @errors
end