Class: LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError
- Inherits:
-
Error
- Object
- Error
- LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError
- Defined in:
- lib/logstash/outputs/elasticsearch/http_client/pool.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#response_code ⇒ Object
readonly
Returns the value of attribute response_code.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(response_code, url, body) ⇒ BadResponseCodeError
constructor
A new instance of BadResponseCodeError.
- #message ⇒ Object
Constructor Details
#initialize(response_code, url, body) ⇒ BadResponseCodeError
Returns a new instance of BadResponseCodeError.
7 8 9 10 11 |
# File 'lib/logstash/outputs/elasticsearch/http_client/pool.rb', line 7 def initialize(response_code, url, body) @response_code = response_code @url = ::LogStash::Outputs::ElasticSearch::SafeURL.without_credentials(url) @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
5 6 7 |
# File 'lib/logstash/outputs/elasticsearch/http_client/pool.rb', line 5 def body @body end |
#response_code ⇒ Object (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 |
#url ⇒ Object (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
#message ⇒ Object
13 14 15 |
# File 'lib/logstash/outputs/elasticsearch/http_client/pool.rb', line 13 def "Got response code '#{response_code}' contact Elasticsearch at URL '#{@url}'" end |