Exception: JSONAPI::Exceptions::InvalidFiltersSyntax
- Defined in:
- lib/jsonapi/exceptions.rb
Instance Attribute Summary collapse
-
#filters ⇒ Object
Returns the value of attribute filters.
Attributes inherited from Error
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(filters, error_object_overrides = {}) ⇒ InvalidFiltersSyntax
constructor
A new instance of InvalidFiltersSyntax.
Methods inherited from Error
Constructor Details
#initialize(filters, error_object_overrides = {}) ⇒ InvalidFiltersSyntax
Returns a new instance of InvalidFiltersSyntax.
185 186 187 188 |
# File 'lib/jsonapi/exceptions.rb', line 185 def initialize(filters, error_object_overrides = {}) @filters = filters super(error_object_overrides) end |
Instance Attribute Details
#filters ⇒ Object
Returns the value of attribute filters.
183 184 185 |
# File 'lib/jsonapi/exceptions.rb', line 183 def filters @filters end |
Instance Method Details
#errors ⇒ Object
190 191 192 193 194 195 196 197 198 |
# File 'lib/jsonapi/exceptions.rb', line 190 def errors [create_error_object(code: JSONAPI::INVALID_FILTERS_SYNTAX, status: :bad_request, title: I18n.translate('jsonapi-resources.exceptions.invalid_filter_syntax.title', default: 'Invalid filters syntax'), detail: I18n.translate('jsonapi-resources.exceptions.invalid_filter_syntax.detail', default: "#{filters} is not a valid syntax for filtering.", filters: filters))] end |