Rescue exceptions caused by FetchLinkCardService (#4045)
This commit is contained in:
parent
be94f9e35d
commit
a6d02cff36
2 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue