commit: 1273fbf86ea3bd906e687a33e1f62c99f100ecca
parent: a27879c0cf89d99fb79e2ffbe7ecfdf72733a1c4
Author: abcang <abcang1015@gmail.com>
Date: Fri, 30 Jun 2017 20:38:36 +0900
Rescue Addressable::URI::InvalidURIError at Remotable (#4017)
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git 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