]> cat aescling's git repositories - mastodon.git/commitdiff
Rescue Mastodon::LengthValidationError in FetchLinkCardService (#7424)
authorYamagishi Kazutoshi <ykzts@desire.sh>
Wed, 9 May 2018 06:39:08 +0000 (15:39 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 9 May 2018 06:39:08 +0000 (08:39 +0200)
app/services/fetch_link_card_service.rb

index 77d4aa5381bb40a92b6e9e42569f03b991930f18..f9b1b2f0c63b3d1298abb08cb31410d29f12a1b9 100644 (file)
@@ -27,7 +27,7 @@ class FetchLinkCardService < BaseService
     end
 
     attach_card if @card&.persisted?
-  rescue HTTP::Error, Addressable::URI::InvalidURIError => e
+  rescue HTTP::Error, Addressable::URI::InvalidURIError, Mastodon::LengthValidationError => e
     Rails.logger.debug "Error fetching link #{@url}: #{e}"
     nil
   end