Closed peetucket closed 9 months ago
Issue is that the response in the client can have a blank identifiers block like this:
{"identifiers"=>""}
instead of something like this:
{"identifiers"=> {"identifier"=>[{"type"=>"issn", "value"=>"0027-8424"}, {"type"=>"eissn", "value"=>"1091-6490"}, {"type"=>"doi", "value"=>"10.1073/pnas.1524806113"}, {"type"=>"pmid", "value"=>"MEDLINE:27035977"}]}}
which leads to a problem trying to dig into the blank block here: https://github.com/sul-dlss/sul_pub/blob/main/lib/clarivate/rest_links_client.rb#L75
See https://app.honeybadger.io/projects/50046/faults/101491188
Found it:
... WOS:A1978ES84600010 : {"WOS:A1978ES84600010"=>{}} WOS:A1975W192600011 : String does not have #dig method WOS:000373762400034 : {"WOS:000373762400034"=>{"doi"=>"10.1073/pnas.1524806113", "pmid"=>"27035977"}} ...