Exception: JSONAPI::Exceptions::InvalidFilterValue
- Defined in:
- lib/jsonapi/exceptions.rb
Instance Attribute Summary collapse
-
#filter ⇒ Object
Returns the value of attribute filter.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(filter, value) ⇒ InvalidFilterValue
constructor
A new instance of InvalidFilterValue.
Constructor Details
#initialize(filter, value) ⇒ InvalidFilterValue
Returns a new instance of InvalidFilterValue.
122 123 124 125 |
# File 'lib/jsonapi/exceptions.rb', line 122 def initialize(filter, value) @filter = filter @value = value end |
Instance Attribute Details
#filter ⇒ Object
Returns the value of attribute filter.
121 122 123 |
# File 'lib/jsonapi/exceptions.rb', line 121 def filter @filter end |
#value ⇒ Object
Returns the value of attribute value.
121 122 123 |
# File 'lib/jsonapi/exceptions.rb', line 121 def value @value end |
Instance Method Details
#errors ⇒ Object
127 128 129 130 131 132 |
# File 'lib/jsonapi/exceptions.rb', line 127 def errors [JSONAPI::Error.new(code: JSONAPI::INVALID_FILTER_VALUE, status: :bad_request, title: 'Invalid filter value', detail: "#{value} is not a valid value for #{filter}.")] end |