From d9e00170dd8ea1c4b21578a5aa96ab67187272f7 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Fri, 12 Apr 2019 10:25:02 +0200 Subject: [PATCH] don't report to sentry when elasticsearch 400 error --- app/controllers/dois_controller.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/controllers/dois_controller.rb b/app/controllers/dois_controller.rb index 3c7356396..5a12c7abd 100644 --- a/app/controllers/dois_controller.rb +++ b/app/controllers/dois_controller.rb @@ -186,8 +186,6 @@ def index format.any(:bibtex, :citeproc, :codemeta, :crosscite, :datacite, :datacite_json, :jats, :ris, :csv, :schema_org) { render request.format.to_sym => response.records.to_a } end rescue Elasticsearch::Transport::Transport::Errors::BadRequest => exception - Raven.capture_exception(exception) - message = JSON.parse(exception.message[6..-1]).to_h.dig("error", "root_cause", 0, "reason") render json: { "errors" => { "title" => message }}.to_json, status: :bad_request