]> cat aescling's git repositories - mastodon.git/commitdiff
Catch Paperclip processing failures (fixes #6378) (#7439)
authorThibG <thib@sitedethib.com>
Fri, 11 May 2018 11:14:50 +0000 (13:14 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Fri, 11 May 2018 11:14:50 +0000 (13:14 +0200)
app/models/concerns/remotable.rb

index 7f1ef5191bb0737428f47508c1ce70e0c7f4d0a2..20ddbca53ce758f26204b7b8867aa7504c3eda89 100644 (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
           Rails.logger.debug "Error fetching remote #{attachment_name}: #{e}"
           nil
+        rescue Paperclip::Error => e
+          Rails.logger.debug "Error processing remote #{attachment_name}: #{e}"
+          nil
         end
       end