From: abcang Date: Fri, 30 Jun 2017 11:38:36 +0000 (+0900) Subject: Rescue Addressable::URI::InvalidURIError at Remotable (#4017) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=1273fbf86ea3bd906e687a33e1f62c99f100ecca;p=mastodon.git Rescue Addressable::URI::InvalidURIError at Remotable (#4017) --- 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