class Caprese::DeleteRestrictedError

Thrown when an attempt was made to delete a record, but the record could not be deleted because of restrictions

@param [String] reason the reason for the restriction

Public Class Methods

new(reason) click to toggle source
Calls superclass method Caprese::Error::new
# File lib/caprese/errors.rb, line 80
def initialize(reason)
  super code: :delete_restricted, t: { reason: reason }
  @header = { status: :forbidden }
end