Skip to content

Commit

Permalink
Catch transport errors and log
Browse files Browse the repository at this point in the history
This is to prevent filling the logs.
  • Loading branch information
richardhallett committed Jun 1, 2023
1 parent 981d063 commit 399a168
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/jobs/index_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 399a168

Please sign in to comment.