Exception: LogStash::Api::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- LogStash::Api::ApiError
- Defined in:
- lib/logstash/api/errors.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(message = nil) ⇒ ApiError
constructor
A new instance of ApiError.
- #status_code ⇒ Object
- #to_hash ⇒ Object
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( = nil) super( || "Api Error") end |
Instance Method Details
#status_code ⇒ Object
9 10 11 |
# File 'lib/logstash/api/errors.rb', line 9 def status_code 500 end |
#to_hash ⇒ Object
13 14 15 |
# File 'lib/logstash/api/errors.rb', line 13 def to_hash { :message => to_s } end |