Class: LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError

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(original_error, url) ⇒ HostUnreachableError

Returns a new instance of HostUnreachableError.



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

def initialize(original_error, url)
  @original_error = original_error
  @url = ::LogStash::Outputs::ElasticSearch::SafeURL.without_credentials(url)
end

Instance Attribute Details

#original_errorObject (readonly)

Returns the value of attribute original_error.



18
19
20
# File 'lib/logstash/outputs/elasticsearch/http_client/pool.rb', line 18

def original_error
  @original_error
end

#urlObject (readonly)

Returns the value of attribute url.



18
19
20
# File 'lib/logstash/outputs/elasticsearch/http_client/pool.rb', line 18

def url
  @url
end

Instance Method Details

#messageObject



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

def message
  "Elasticsearch Unreachable: [#{@url}][#{original_error.class}] #{original_error.message}"
end