CDRH / datura

Datura is a ruby gem that manages data (TEI-XML, CSVs, VRA-XML, etc) and populates Solr / Elasticsearch instances. Datura also generates HTML for the formats to allow serving the contents via web
6 stars 5 forks source link

e.response failure #161

Open jduss4 opened 4 years ago

jduss4 commented 4 years ago

Looks like trying to call a method on an error that isn't working out for us.

https://github.com/CDRH/datura/blob/dev/lib/datura/file_type.rb#L69

Successfully transformed nela.1966_044_10.xml
Traceback (most recent call last):
    5: from /usr/local/rvm/gems/ruby-2.5.3@datura_nebraskaland/bundler/gems/datura-44f60a131bb2/lib/datura/data_manager.rb:116:in `block (3 levels) in batch_process_files'
    4: from /usr/local/rvm/gems/ruby-2.5.3@datura_nebraskaland/bundler/gems/datura-44f60a131bb2/lib/datura/data_manager.rb:284:in `transform_and_post'
    3: from /usr/local/rvm/gems/ruby-2.5.3@datura_nebraskaland/bundler/gems/datura-44f60a131bb2/lib/datura/file_type.rb:50:in `post_es'
    2: from /usr/local/rvm/gems/ruby-2.5.3@datura_nebraskaland/bundler/gems/datura-44f60a131bb2/lib/datura/file_type.rb:50:in `each'
    1: from /usr/local/rvm/gems/ruby-2.5.3@datura_nebraskaland/bundler/gems/datura-44f60a131bb2/lib/datura/file_type.rb:56:in `block in post_es'
/usr/local/rvm/gems/ruby-2.5.3@datura_nebraskaland/bundler/gems/datura-44f60a131bb2/lib/datura/file_type.rb:59:in `rescue in block in post_es': undefined method `response' for #<URI::InvalidURIError:0x0000000001af0838> (NoMethodError)
Did you mean?  respond_to?
techgique commented 4 years ago

Looks like URI::InvalidURIError has not methods whatsoever:

wkdewey commented 2 years ago

We changed how error handling works, so check if this is still relevant

wkdewey commented 2 years ago

I fixed this in the latest branch