From b84e87dedd896976f5f73b7a1ddc27be4039a7d7 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 10 Aug 2017 12:58:56 +0900 Subject: [PATCH] FIX: Don't raise an error if URL timesout. --- app/models/topic_embed.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/topic_embed.rb b/app/models/topic_embed.rb index 9904b05c989..ece08ced70b 100644 --- a/app/models/topic_embed.rb +++ b/app/models/topic_embed.rb @@ -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