0
0
Fork 0

Improve handling of encoding problems when creating link previews (#30929)

This commit is contained in:
David Roetzel 2024-07-05 13:54:38 +02:00 committed by GitHub
parent 05f0d51005
commit 016c1e4e78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 76 additions and 10 deletions

View file

@ -32,7 +32,7 @@ class FetchLinkCardService < BaseService
end
attach_card if @card&.persisted?
rescue HTTP::Error, OpenSSL::SSL::SSLError, Addressable::URI::InvalidURIError, Mastodon::HostValidationError, Mastodon::LengthValidationError, Encoding::UndefinedConversionError => e
rescue HTTP::Error, OpenSSL::SSL::SSLError, Addressable::URI::InvalidURIError, Mastodon::HostValidationError, Mastodon::LengthValidationError, EncodingError => e
Rails.logger.debug { "Error fetching link #{@original_url}: #{e}" }
nil
end