Exception: Permittable::InvalidParameters
- Inherits:
-
StandardError
- Object
- StandardError
- Permittable::InvalidParameters
- Defined in:
- lib/permittable.rb
Overview
Raised when the request violates the matching contract. details is an
array of { param:, code: } hashes; status is :bad_request for a missing
root key, :unprocessable_entity for field violations.
Instance Attribute Summary collapse
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message, details: [], status: :unprocessable_entity) ⇒ InvalidParameters
constructor
A new instance of InvalidParameters.
Constructor Details
#initialize(message, details: [], status: :unprocessable_entity) ⇒ InvalidParameters
Returns a new instance of InvalidParameters.
146 147 148 149 150 |
# File 'lib/permittable.rb', line 146 def initialize(, details: [], status: :unprocessable_entity) super() @details = details @status = status end |
Instance Attribute Details
#details ⇒ Object (readonly)
Returns the value of attribute details.
144 145 146 |
# File 'lib/permittable.rb', line 144 def details @details end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
144 145 146 |
# File 'lib/permittable.rb', line 144 def status @status end |