Module: Elastic::Client::Error
- Defined in:
- lib/elastic/client/error.rb
Instance Method Summary collapse
Instance Method Details
#response ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/elastic/client/error.rb', line 14 def response return @response if defined?(@response) if captures = .match(/(?<response>\{.+\})$/) @response = JSON.parse(captures[:response]) end end |
#status ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/elastic/client/error.rb', line 6 def status return @status if defined?(@status) if captures = .match(/^\[(?<status>\d+)\]/) @status = captures[:status].to_i end end |