relaton / relaton-iso

RelatonIso: ISO Standards metadata using the BibliographicItem model
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

Fetch from ISO site failed but threw error #69

Closed ronaldtse closed 5 years ago

ronaldtse commented 5 years ago

Fetch from ISO site failed but threw error. I believe this is when I disconnected my internet. It should also catch this timeout instead of hard fail. When online fetch fails, we should fallback to use the cached entry.

fetching ISO 19160-1...
Could not retrieve ISO 19160-1: no access to online site
fetching ISO 19103...
Could not retrieve ISO 19103: no access to online site
fetching ISO 19106...
fetching ISO 19115-1...
Could not retrieve ISO 19115-1: no access to online site
fetching ISO 19157...
fetching ISO 19135-1...
bundler: failed to load command: metanorma (/Users/me/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/bin/metanorma)
Errno::ETIMEDOUT: Failed to open TCP connection to www.iso.org:443 (Operation timed out - connect(2) for "www.iso.org" port 443)
  /Users/me/.rbenv/versions/2.5.1/lib/ruby/2.5.0/net/http.rb:939:in `rescue in block in connect'
  /Users/me/.rbenv/versions/2.5.1/lib/ruby/2.5.0/net/http.rb:936:in `block in connect'
  /Users/me/.rbenv/versions/2.5.1/lib/ruby/2.5.0/timeout.rb:93:in `block in timeout'
  /Users/me/.rbenv/versions/2.5.1/lib/ruby/2.5.0/timeout.rb:103:in `timeout'
  /Users/me/.rbenv/versions/2.5.1/lib/ruby/2.5.0/net/http.rb:935:in `connect'
  /Users/me/.rbenv/versions/2.5.1/lib/ruby/2.5.0/net/http.rb:920:in `do_start'
  /Users/me/.rbenv/versions/2.5.1/lib/ruby/2.5.0/net/http.rb:909:in `start'
  /Users/me/.rbenv/versions/2.5.1/lib/ruby/2.5.0/net/http.rb:1455:in `request'
  /Users/me/.rbenv/versions/2.5.1/lib/ruby/2.5.0/net/http.rb:1213:in `get'
  /Users/me/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/relaton-iso-0.6.4/lib/relaton_iso/hit_collection.rb:30:in `initialize'
  /Users/me/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/relaton-iso-0.6.4/lib/relaton_iso/iso_bibliography.rb:15:in `new'
  /Users/me/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/relaton-iso-0.6.4/lib/relaton_iso/iso_bibliography.rb:15:in `search'
  /Users/me/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/relaton-iso-0.6.4/lib/relaton_iso/iso_bibliography.rb:93:in `isobib_search_filter'
  /Users/me/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/relaton-iso-0.6.4/lib/relaton_iso/iso_bibliography.rb:159:in `isobib_get1'
andrew2net commented 5 years ago

Net::HTTP raises a lot of errors. I thought I added all of them. Will add this error.

ronaldtse commented 5 years ago

Thanks @andrew2net !