From 693c22e6fadd3f998ff730e43157d15ab80b1018 Mon Sep 17 00:00:00 2001 From: Wendel Fabian Chinsamy Date: Tue, 14 Jan 2025 09:14:08 +0200 Subject: [PATCH] add logging for debugging --- app/models/related_identifier.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/models/related_identifier.rb b/app/models/related_identifier.rb index 7b0526e..18a24e8 100644 --- a/app/models/related_identifier.rb +++ b/app/models/related_identifier.rb @@ -65,7 +65,13 @@ def self.push_item(item) doi = attributes.fetch("doi", nil) Rails.logger.info("Related Identifier: doi -> #{doi.inspect}") - Rails.logger.info("[Related Identifier: cached_doi_ra #{cached_doi_ra(doi)}]") + begin + cdr = cached_doi_ra(doi) + Rails.logger.info("[Related Identifier: cached_doi_ra #{cdr}]") + rescue => err + Rails.logger.info(err.inspect) + Rails.logger.error(err) + end return nil unless doi.present? && cached_doi_ra(doi) == "DataCite"