FIX: Don't raise an error if URL timesout.

This commit is contained in:
Guo Xiang Tan 2017-08-10 12:58:56 +09:00
parent a849959915
commit b84e87dedd
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ class TopicEmbed < ActiveRecord::Base
response = FetchResponse.new
begin
html = open(URI.encode(url), allow_redirections: :safe).read
rescue OpenURI::HTTPError
rescue OpenURI::HTTPError, Net::OpenTimeout
return
end