Commit 9276c157629a052d9e1f84414bd81a73ce39ef49
1 parent
326e97bb
Exists in
master
and in
21 other branches
Handle update errors
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/searchkick.rb
... | ... | @@ -112,7 +112,7 @@ module Searchkick |
112 | 112 | response = client.bulk(body: items) |
113 | 113 | if response["errors"] |
114 | 114 | first_with_error = response["items"].map do |item| |
115 | - (item["index"] || item["delete"]) | |
115 | + (item["index"] || item["delete"] || item['update']) | |
116 | 116 | end.find { |item| item["error"] } |
117 | 117 | raise Searchkick::ImportError, "#{first_with_error["error"]} on item with id '#{first_with_error["_id"]}'" |
118 | 118 | end | ... | ... |