0
0
Fork 0

Rescue exceptions caused by FetchLinkCardService (#4045)

This commit is contained in:
abcang 2017-07-03 18:03:34 +09:00 committed by Eugen Rochko
parent be94f9e35d
commit a6d02cff36
2 changed files with 8 additions and 2 deletions

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