diff --git a/app/controllers/dois_controller.rb b/app/controllers/dois_controller.rb index dfa1704ce..93d230552 100644 --- a/app/controllers/dois_controller.rb +++ b/app/controllers/dois_controller.rb @@ -8,6 +8,7 @@ class DoisController < ApplicationController prepend_before_action :authenticate_user! before_action :set_doi, only: [:show, :destroy, :get_url] before_action :set_include, only: [:index, :show, :create, :update] + before_action :set_raven_context, only: [:create, :update, :validate] def index authorize! :read, Doi @@ -556,11 +557,9 @@ def safe_params :lastLandingPageStatusResult, :lastLandingPageContentType) end - # def add_metadata_to_bugsnag(report) - # return nil unless params.dig(:data, :attributes, :xml).present? + def set_raven_context + return nil unless params.dig(:data, :attributes, :xml).present? - # report.add_tab(:metadata, { - # metadata: Base64.decode64(params.dig(:data, :attributes, :xml)) - # }) - # end + Raven.extra_context metadata: Base64.decode64(params.dig(:data, :attributes, :xml)) + end end diff --git a/app/controllers/works_controller.rb b/app/controllers/works_controller.rb index 3943baf2b..ff8a5c9a1 100644 --- a/app/controllers/works_controller.rb +++ b/app/controllers/works_controller.rb @@ -150,12 +150,4 @@ def set_include @include = nil end end - - # def add_metadata_to_bugsnag(report) - # return nil unless params.dig(:data, :attributes, :xml).present? - - # report.add_tab(:metadata, { - # metadata: Base64.decode64(params.dig(:data, :attributes, :xml)) - # }) - # end end