Exception: Elastic::AppSearch::UnexpectedHTTPException
- Inherits:
-
ClientException
- Object
- StandardError
- ClientException
- Elastic::AppSearch::UnexpectedHTTPException
- Defined in:
- lib/elastic/app-search/exceptions.rb
Instance Attribute Summary
Attributes inherited from ClientException
Instance Method Summary collapse
-
#initialize(response, response_json) ⇒ UnexpectedHTTPException
constructor
A new instance of UnexpectedHTTPException.
Methods inherited from ClientException
Constructor Details
#initialize(response, response_json) ⇒ UnexpectedHTTPException
Returns a new instance of UnexpectedHTTPException.
28 29 30 31 |
# File 'lib/elastic/app-search/exceptions.rb', line 28 def initialize(response, response_json) errors = (response_json['errors'] || [response.]).map { |e| "(#{response.code}) #{e}" } super({ 'errors' => errors }) end |