Exception: ElasticSearch::ResponseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/elastic_search.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code:, body:) ⇒ ResponseError

Returns a new instance of ResponseError



28
29
30
31
# File 'lib/elastic_search.rb', line 28

def initialize(code:, body:)
  @code = code
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body



26
27
28
# File 'lib/elastic_search.rb', line 26

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code



26
27
28
# File 'lib/elastic_search.rb', line 26

def code
  @code
end

Instance Method Details

#to_sObject



33
34
35
# File 'lib/elastic_search.rb', line 33

def to_s
  "#{self.class.name} (#{code}): #{body}"
end