Exception: Error::BadResponseCodeError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/logstash/outputs/exception/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response_code, url) ⇒ BadResponseCodeError

Returns a new instance of BadResponseCodeError.



5
6
7
8
# File 'lib/logstash/outputs/exception/error.rb', line 5

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

Instance Attribute Details

#response_codeObject (readonly)

Returns the value of attribute response_code.



3
4
5
# File 'lib/logstash/outputs/exception/error.rb', line 3

def response_code
  @response_code
end

#urlObject (readonly)

Returns the value of attribute url.



3
4
5
# File 'lib/logstash/outputs/exception/error.rb', line 3

def url
  @url
end

Instance Method Details

#messageObject



10
11
12
# File 'lib/logstash/outputs/exception/error.rb', line 10

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