Exception: Caprese::RequestDocumentInvalidError

Inherits:
Error
  • Object
show all
Defined in:
lib/caprese/errors.rb

Overview

Thrown when a request document contained an error that made it unprocessable

Instance Attribute Summary collapse

Attributes inherited from Error

#code, #field, #header, #t

Instance Method Summary collapse

Methods inherited from Error

#as_json, #full_message, #i18n_scope, #with_header

Constructor Details

#initialize(field: nil, code: :invalid, t: {}) ⇒ RequestDocumentInvalidError

Returns a new instance of RequestDocumentInvalidError.



12
13
14
15
16
# File 'lib/caprese/errors.rb', line 12

def initialize(field: nil, code: :invalid, t: {})
  super
  @document = true
  @header = { status: :unprocessable_entity }
end

Instance Attribute Details

#documentObject (readonly)

Returns the value of attribute document.



10
11
12
# File 'lib/caprese/errors.rb', line 10

def document
  @document
end