Merge pull request #2070 from aignatov-bio/ai-sci-3874-error-handling-when-image-unavalialbe-for-base64

Error handling, when image unavaliable for base64 [SCI-3874]
This commit is contained in:
aignatov-bio 2019-09-18 15:27:49 +02:00 committed by GitHub
commit 7951ae4218
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,5 +11,8 @@ module ImageVariantProcessing
end
encoded_data = Base64.strict_encode64(image_link)
"data:#{variant.image.blob.content_type};base64,#{encoded_data}"
rescue StandardError => e
Rails.logger.error e.message
"data:#{variant.image.blob.content_type};base64,"
end
end