Exception: Common::Exceptions::InvalidFiltersSyntax
- Inherits:
-
BaseError
- Object
- StandardError
- BaseError
- Common::Exceptions::InvalidFiltersSyntax
- Defined in:
- lib/common/exceptions/invalid_filters_syntax.rb
Overview
InvalidFiltersSyntax - filter keys are invalid
Instance Attribute Summary collapse
-
#filters ⇒ Object
readonly
Returns the value of attribute filters.
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(filters, options = {}) ⇒ InvalidFiltersSyntax
constructor
A new instance of InvalidFiltersSyntax.
Methods inherited from BaseError
#i18n_data, #i18n_field, #i18n_interpolated, #i18n_key, #log_to_sentry?, #message, #sentry_type, #status_code
Constructor Details
#initialize(filters, options = {}) ⇒ InvalidFiltersSyntax
Returns a new instance of InvalidFiltersSyntax.
12 13 14 15 |
# File 'lib/common/exceptions/invalid_filters_syntax.rb', line 12 def initialize(filters, = {}) @filters = filters @detail = [:detail] || i18n_field(:detail, filters: @filters) end |
Instance Attribute Details
#filters ⇒ Object (readonly)
Returns the value of attribute filters.
10 11 12 |
# File 'lib/common/exceptions/invalid_filters_syntax.rb', line 10 def filters @filters end |
Instance Method Details
#errors ⇒ Object
17 18 19 |
# File 'lib/common/exceptions/invalid_filters_syntax.rb', line 17 def errors Array(SerializableError.new(i18n_data.merge(detail: @detail))) end |