Class: LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError

Inherits:
Error
  • Object
show all
Defined in:
lib/logstash/outputs/elasticsearch/http_client/pool.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response_code, url, request_body, response_body) ⇒ BadResponseCodeError

Returns a new instance of BadResponseCodeError.



7
8
9
10
11
12
# File 'lib/logstash/outputs/elasticsearch/http_client/pool.rb', line 7

def initialize(response_code, url, request_body, response_body)
  @response_code = response_code
  @url = url
  @request_body = request_body
  @response_body = response_body
end

Instance Attribute Details

#request_bodyObject (readonly)

Returns the value of attribute request_body.



5
6
7
# File 'lib/logstash/outputs/elasticsearch/http_client/pool.rb', line 5

def request_body
  @request_body
end

#response_bodyObject (readonly)

Returns the value of attribute response_body.



5
6
7
# File 'lib/logstash/outputs/elasticsearch/http_client/pool.rb', line 5

def response_body
  @response_body
end

#response_codeObject (readonly)

Returns the value of attribute response_code.



5
6
7
# File 'lib/logstash/outputs/elasticsearch/http_client/pool.rb', line 5

def response_code
  @response_code
end

#urlObject (readonly)

Returns the value of attribute url.



5
6
7
# File 'lib/logstash/outputs/elasticsearch/http_client/pool.rb', line 5

def url
  @url
end

Instance Method Details

#messageObject



14
15
16
# File 'lib/logstash/outputs/elasticsearch/http_client/pool.rb', line 14

def message
  "Got response code '#{response_code}' contacting Elasticsearch at URL '#{@url}'"
end