Rescue exceptions caused by FetchLinkCardService (#4045)

This commit is contained in:
abcang authored and Eugen Rochko committed 2017-07-03 11:03:34 +02:00
1 parent be94f9e35d
commit a6d02cff36
2 files changed
+8 -2

No files matched your search

+2
View File
@@ -18,6 +18,8 @@ class FetchLinkCardService < BaseService
return if res.code != 200 || res.mime_type != 'text/html'
attempt_opengraph(card, url) unless attempt_oembed(card, url)
rescue HTTP::ConnectionError, OpenSSL::SSL::SSLError
nil
end
private