Browse Source

Rescue Addressable::URI::InvalidURIError at Remotable (#4017)

pull/4/head
abcang 6 years ago
committed by Eugen Rochko
parent
commit
1273fbf86e
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      app/models/concerns/remotable.rb

+ 2
- 1
app/models/concerns/remotable.rb View File

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

Loading…
Cancel
Save