Catch Paperclip processing failures (fixes #6378) (#7439)

remotes/1727458204337373841/tmp_refs/heads/signup-info-prompt
ThibG 2018-05-11 13:14:50 +02:00 committed by Eugen Rochko
parent 50491e0d92
commit be7eeb7856
1 changed files with 3 additions and 0 deletions

View File

@ -41,6 +41,9 @@ module Remotable
rescue HTTP::TimeoutError, HTTP::ConnectionError, OpenSSL::SSL::SSLError, Paperclip::Errors::NotIdentifiedByImageMagickError, Addressable::URI::InvalidURIError, Mastodon::HostValidationError, Mastodon::LengthValidationError => e rescue HTTP::TimeoutError, HTTP::ConnectionError, OpenSSL::SSL::SSLError, Paperclip::Errors::NotIdentifiedByImageMagickError, Addressable::URI::InvalidURIError, Mastodon::HostValidationError, Mastodon::LengthValidationError => e
Rails.logger.debug "Error fetching remote #{attachment_name}: #{e}" Rails.logger.debug "Error fetching remote #{attachment_name}: #{e}"
nil nil
rescue Paperclip::Error => e
Rails.logger.debug "Error processing remote #{attachment_name}: #{e}"
nil
end end
end end