lib/valkyrie/persistence/solr/repository.rb in valkyrie-1.2.0 vs lib/valkyrie/persistence/solr/repository.rb in valkyrie-1.2.1

- old
+ new

@@ -36,10 +36,10 @@ # rubocop:disable Style/IfUnlessModifier def add_documents(documents) connection.add documents, params: COMMIT_PARAMS rescue RSolr::Error::Http => exception # Error 409 conflict is returned when versions do not match - if exception.response[:status] == 409 + if exception.response&.fetch(:status) == 409 handle_conflict end raise exception end # rubocop:enable Style/IfUnlessModifier