Commit aa85a741ad770ae967d08c0746106943cc364b53
Exists in
master
and in
21 other branches
Merge branch 'handle_error_on_update' of https://github.com/klebervirgilio/searc…
…hkick into klebervirgilio-handle_error_on_update
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/searchkick.rb
... | ... | @@ -124,7 +124,7 @@ module Searchkick |
124 | 124 | response = client.bulk(body: items) |
125 | 125 | if response["errors"] |
126 | 126 | first_with_error = response["items"].map do |item| |
127 | - (item["index"] || item["delete"]) | |
127 | + (item["index"] || item["delete"] || items['update']) | |
128 | 128 | end.find { |item| item["error"] } |
129 | 129 | raise Searchkick::ImportError, "#{first_with_error["error"]} on item with id '#{first_with_error["_id"]}'" |
130 | 130 | end | ... | ... |