From 399a168a99f7156578be4844b09b40640549fe0f Mon Sep 17 00:00:00 2001 From: Richard Hallett Date: Thu, 1 Jun 2023 21:28:40 +0200 Subject: [PATCH] Catch transport errors and log This is to prevent filling the logs. --- app/jobs/index_job.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/jobs/index_job.rb b/app/jobs/index_job.rb index c789c1fcf..b1f8505e9 100644 --- a/app/jobs/index_job.rb +++ b/app/jobs/index_job.rb @@ -5,7 +5,8 @@ class IndexJob < ApplicationJob rescue_from ActiveJob::DeserializationError, SocketError, - Elasticsearch::Transport::Transport::Errors::BadRequest do |error| + Elasticsearch::Transport::Transport::Errors::BadRequest, + Elasticsearch::Transport::Transport::Error do |error| Rails.logger.error error.message end