about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorabcang <abcang1015@gmail.com>2017-06-30 20:38:36 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-06-30 13:38:36 +0200
commit1273fbf86ea3bd906e687a33e1f62c99f100ecca (patch)
treefd60832a6d5cd18c4bc734f49dae7d404aee7287 /app/models
parenta27879c0cf89d99fb79e2ffbe7ecfdf72733a1c4 (diff)
Rescue Addressable::URI::InvalidURIError at Remotable (#4017)
Diffstat (limited to 'app/models')
-rw-r--r--app/models/concerns/remotable.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/concerns/remotable.rb b/app/models/concerns/remotable.rb
index 4a412ee3d..b0077ce96 100644
--- a/app/models/concerns/remotable.rb
+++ b/app/models/concerns/remotable.rb
@@ -26,8 +26,9 @@ module Remotable
           send("#{attachment_name}_file_name=", filename)
 
           self[attribute_name] = url if has_attribute?(attribute_name)
-        rescue HTTP::TimeoutError, OpenSSL::SSL::SSLError, Paperclip::Errors::NotIdentifiedByImageMagickError => e
+        rescue HTTP::TimeoutError, OpenSSL::SSL::SSLError, Paperclip::Errors::NotIdentifiedByImageMagickError, Addressable::URI::InvalidURIError => e
           Rails.logger.debug "Error fetching remote #{attachment_name}: #{e}"
+          nil
         end
       end
     end