Exception: Common::Exceptions::FilterNotAllowed

Inherits:
BaseError
  • Object
show all
Defined in:
lib/common/exceptions/filter_not_allowed.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseError

#i18n_data, #i18n_field, #i18n_interpolated, #i18n_key, #log_to_sentry?, #message, #sentry_type, #status_code

Constructor Details

#initialize(filter) ⇒ FilterNotAllowed

Returns a new instance of FilterNotAllowed.



11
12
13
# File 'lib/common/exceptions/filter_not_allowed.rb', line 11

def initialize(filter)
  @filter = filter
end

Instance Attribute Details

#filterObject (readonly)

Returns the value of attribute filter.



9
10
11
# File 'lib/common/exceptions/filter_not_allowed.rb', line 9

def filter
  @filter
end

Instance Method Details

#errorsObject



15
16
17
# File 'lib/common/exceptions/filter_not_allowed.rb', line 15

def errors
  Array(SerializableError.new(i18n_interpolated(detail: { filter: @filter })))
end