Exception: Scimitar::FilterError

Inherits:
ErrorResponse show all
Defined in:
app/models/scimitar/filter_error.rb

Overview

Raised when an invalid query is attempted, either by being malformed or by being unsupported in some way.

Instance Attribute Summary

Attributes inherited from ErrorResponse

#detail, #scimType, #status

Instance Method Summary collapse

Methods inherited from ErrorResponse

#as_json, #message

Constructor Details

#initialize(message = nil) ⇒ FilterError

Returns a new instance of FilterError.



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/models/scimitar/filter_error.rb', line 7

def initialize(message = nil)
  detail = 'The specified filter syntax was invalid, or the specified attribute and filter comparison combination is not supported'

  if message.present?
    detail << ":\n#{message}"
  end

  super(
    status:   400,
    scimType: 'invalidFilter',
    detail:   detail
  )
end