Exception: JSONAPI::Exceptions::FilterNotAllowed
- Defined in:
- lib/jsonapi/exceptions.rb
Instance Attribute Summary collapse
-
#filter ⇒ Object
Returns the value of attribute filter.
Attributes inherited from Error
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(filter, error_object_overrides = {}) ⇒ FilterNotAllowed
constructor
A new instance of FilterNotAllowed.
Methods inherited from Error
Constructor Details
#initialize(filter, error_object_overrides = {}) ⇒ FilterNotAllowed
Returns a new instance of FilterNotAllowed.
201 202 203 204 |
# File 'lib/jsonapi/exceptions.rb', line 201 def initialize(filter, error_object_overrides = {}) @filter = filter super(error_object_overrides) end |
Instance Attribute Details
#filter ⇒ Object
Returns the value of attribute filter.
199 200 201 |
# File 'lib/jsonapi/exceptions.rb', line 199 def filter @filter end |
Instance Method Details
#errors ⇒ Object
206 207 208 209 210 211 212 213 |
# File 'lib/jsonapi/exceptions.rb', line 206 def errors [create_error_object(code: JSONAPI::FILTER_NOT_ALLOWED, status: :bad_request, title: I18n.translate('jsonapi-resources.exceptions.filter_not_allowed.title', default: 'Filter not allowed'), detail: I18n.translate('jsonapi-resources.exceptions.filter_not_allowed.detail', default: "#{filter} is not allowed.", filter: filter))] end |