Exception: LogStash::Api::ApiError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/logstash/api/errors.rb

Direct Known Subclasses

NotFoundError

Instance Method Summary collapse

Constructor Details

#initialize(message = nil) ⇒ ApiError

Returns a new instance of ApiError.



5
6
7
# File 'lib/logstash/api/errors.rb', line 5

def initialize(message = nil)
  super(message || "Api Error")
end

Instance Method Details

#status_codeObject



9
10
11
# File 'lib/logstash/api/errors.rb', line 9

def status_code
  500
end

#to_hashObject



13
14
15
# File 'lib/logstash/api/errors.rb', line 13

def to_hash
  { :message => to_s }
end