Exception: Caprese::RequestDocumentInvalidError
- Defined in:
- lib/caprese/errors.rb
Overview
Thrown when a request document contained an error that made it unprocessable
Instance Attribute Summary collapse
-
#document ⇒ Object
readonly
Returns the value of attribute document.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(field: nil, code: :invalid, t: {}) ⇒ RequestDocumentInvalidError
constructor
A new instance of RequestDocumentInvalidError.
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
#document ⇒ Object (readonly)
Returns the value of attribute document.
10 11 12 |
# File 'lib/caprese/errors.rb', line 10 def document @document end |