chore: Fix RestClient::GatewayTimeout, label_list of NilClass (#1243)

This commit is contained in:
Sojan Jose
2020-09-18 18:50:53 +05:30
committed by GitHub
parent 646746aa10
commit 74d07c876e
3 changed files with 11 additions and 7 deletions

View File

@@ -5,6 +5,6 @@ class ContactAvatarJob < ApplicationJob
avatar_resource = LocalResource.new(avatar_url)
contact.avatar.attach(io: avatar_resource.file, filename: avatar_resource.tmp_filename, content_type: avatar_resource.encoding)
rescue Errno::ETIMEDOUT, Errno::ECONNREFUSED, SocketError, NoMethodError => e
Rails.logger.info "invalid url #{avatar_url} : #{e.message}"
Rails.logger.info "Exception: invalid avatar url #{avatar_url} : #{e.message}"
end
end