FIX: If there's an error downloading, don't raise it

This commit is contained in:
Robin Ward 2017-05-17 12:38:18 -04:00
parent 9090c7b05b
commit f8c503186e
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ class UserAvatar < ActiveRecord::Base
end
end
rescue Net::ReadTimeout
rescue Net::ReadTimeout, OpenURI::HTTPError
# skip saving, we are not connected to the net
ensure
tempfile.close! if tempfile && tempfile.respond_to?(:close!)