Exception: Esse::Transport::BulkResponseError
- Defined in:
- lib/esse/errors.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ BulkResponseError
constructor
A new instance of BulkResponseError.
- #items ⇒ Object
Constructor Details
#initialize(response) ⇒ BulkResponseError
Returns a new instance of BulkResponseError.
21 22 23 24 |
# File 'lib/esse/errors.rb', line 21 def initialize(response) @response = response super(response) end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
19 20 21 |
# File 'lib/esse/errors.rb', line 19 def response @response end |
Instance Method Details
#items ⇒ Object
26 27 28 |
# File 'lib/esse/errors.rb', line 26 def items response.fetch('items', []).select { |item| item.values.dig(0, 'error') } end |