Exception: Caprese::DeleteRestrictedError
- Defined in:
- lib/caprese/errors.rb
Overview
Thrown when an attempt was made to delete a record, but the record could not be deleted because of restrictions
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(reason) ⇒ DeleteRestrictedError
constructor
A new instance of DeleteRestrictedError.
Methods inherited from Error
#as_json, #full_message, #i18n_scope, #with_header
Constructor Details
#initialize(reason) ⇒ DeleteRestrictedError
Returns a new instance of DeleteRestrictedError.
80 81 82 83 |
# File 'lib/caprese/errors.rb', line 80 def initialize(reason) super code: :delete_restricted, t: { reason: reason } @header = { status: :forbidden } end |