Class: LogStash::Outputs::OpenSearch::HttpClient::Pool::BadResponseCodeError

Inherits:
Error
  • Object
show all
Defined in:
lib/logstash/outputs/opensearch/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.


18
19
20
21
22
23
# File 'lib/logstash/outputs/opensearch/http_client/pool.rb', line 18

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.


16
17
18
# File 'lib/logstash/outputs/opensearch/http_client/pool.rb', line 16

def request_body
  @request_body
end

#response_bodyObject (readonly)

Returns the value of attribute response_body.


16
17
18
# File 'lib/logstash/outputs/opensearch/http_client/pool.rb', line 16

def response_body
  @response_body
end

#response_codeObject (readonly)

Returns the value of attribute response_code.


16
17
18
# File 'lib/logstash/outputs/opensearch/http_client/pool.rb', line 16

def response_code
  @response_code
end

#urlObject (readonly)

Returns the value of attribute url.


16
17
18
# File 'lib/logstash/outputs/opensearch/http_client/pool.rb', line 16

def url
  @url
end

Instance Method Details

#messageObject


25
26
27
# File 'lib/logstash/outputs/opensearch/http_client/pool.rb', line 25

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