Rescue Mastodon::LengthValidationError in FetchLinkCardService (#7424)

lolsob-rspec
Yamagishi Kazutoshi 2018-05-09 15:39:08 +09:00 committed by Eugen Rochko
parent 4fea89fe4a
commit 6092325a48
1 changed files with 1 additions and 1 deletions

View 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