You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using LinkThumbnailer, quite a lot of errors need to be accounted for (that aren't caused by LinkThumbnailer itself but e.g. Errno, Net, OpenSSL, SocketError, URI,…). Would it be helpful to rescue all these errors in LinkThumbnailer and raise a single LinkThumbnailer::HttpError error that then can easily be rescued? That would prevent everyone using LinkThumbnailer from manually adding errors to a long list.
> LinkThumbnailer.generate("http://www.mandelbaum.at/books/806/7636")
Nokogiri::XML::SyntaxError: Unsupported encoding ISO-8895-15
File "/app/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/document.rb" line 55 in read_memory
File "/app/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/document.rb" line 55 in parse
File "/app/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.6.2/lib/nokogiri/xml.rb" line 34 in XML
File "/app/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.6.2/lib/nokogiri/html/document.rb" line 256 in detect_encoding
File "/app/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.6.2/lib/nokogiri/html/document.rb" line 201 in parse
File "/app/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.6.2/lib/nokogiri/html.rb" line 15 in HTML
File "/app/vendor/bundle/ruby/2.2.0/gems/link_thumbnailer-3.0.2/lib/link_thumbnailer/parser.rb" line 9 in call
File "/app/vendor/bundle/ruby/2.2.0/gems/link_thumbnailer-3.0.2/lib/link_thumbnailer/scraper.rb" line 27 in initialize
File "/app/vendor/bundle/ruby/2.2.0/gems/link_thumbnailer-3.0.2/lib/link_thumbnailer/page.rb" line 36 in new
File "/app/vendor/bundle/ruby/2.2.0/gems/link_thumbnailer-3.0.2/lib/link_thumbnailer/page.rb" line 36 in scraper
File "/app/vendor/bundle/ruby/2.2.0/gems/link_thumbnailer-3.0.2/lib/link_thumbnailer/page.rb" line 18 in generate
File "/app/vendor/bundle/ruby/2.2.0/gems/link_thumbnailer-3.0.2/lib/link_thumbnailer.rb" line 16 in generate
When using LinkThumbnailer, quite a lot of errors need to be accounted for (that aren't caused by LinkThumbnailer itself but e.g. Errno, Net, OpenSSL, SocketError, URI,…). Would it be helpful to rescue all these errors in LinkThumbnailer and raise a single LinkThumbnailer::HttpError error that then can easily be rescued? That would prevent everyone using LinkThumbnailer from manually adding errors to a long list.
The text was updated successfully, but these errors were encountered: