From fdef14baecadbb251aae3305bc5853689e6ed329 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Thu, 24 Dec 2020 14:57:22 +0100 Subject: [PATCH] better error message --- app/jobs/index_background_job.rb | 3 ++- app/jobs/index_job.rb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/jobs/index_background_job.rb b/app/jobs/index_background_job.rb index 6eda247b1..545248b30 100644 --- a/app/jobs/index_background_job.rb +++ b/app/jobs/index_background_job.rb @@ -10,6 +10,7 @@ class IndexBackgroundJob < ApplicationJob def perform(obj) response = obj.__elasticsearch__.index_document - Rails.logger.error "[Elasticsearch] Error indexing id #{response["_id"]} in index #{response["_index"]}" if response["result"] != "created" + # Rails.logger.error "[Elasticsearch] Error indexing id #{response["_id"]} in index #{response["_index"]}" if response["result"] != "created" + Rails.logger.error "[Elasticsearch] Error #{response.inspect}" if response["result"] != "created" end end diff --git a/app/jobs/index_job.rb b/app/jobs/index_job.rb index addf9de9d..483a33b12 100644 --- a/app/jobs/index_job.rb +++ b/app/jobs/index_job.rb @@ -10,6 +10,7 @@ class IndexJob < ApplicationJob def perform(obj) response = obj.__elasticsearch__.index_document - Rails.logger.error "[Elasticsearch] Error indexing id #{response["_id"]} in index #{response["_index"]}" if response["result"] != "created" + # Rails.logger.error "[Elasticsearch] Error indexing id #{response["_id"]} in index #{response["_index"]}" if response["result"] != "created" + Rails.logger.error "[Elasticsearch] Error #{response.inspect}" if response["result"] != "created" end end