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

th-downstream
ThibG 7 years ago committed by Eugen Rochko
parent fd0f2b675e
commit b59416500e

@ -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

Loading…
Cancel
Save