DEV: add error handling in case download fails

DEV: add error handling in case download fails

diff --git a/lib/tasks/uploads.rake b/lib/tasks/uploads.rake
index 7203e53..55e17d0 100644
--- a/lib/tasks/uploads.rake
+++ b/lib/tasks/uploads.rake
@@ -1071,7 +1071,14 @@ def fix_missing_s3
   ids.each do |id|
     upload = Upload.find(id)
 
-    tempfile = FileHelper.download(upload.url, max_file_size: 30.megabyte, tmp_file_name: "#{SecureRandom.hex}.#{upload.extension}")
+    tempfile = nil
+
+    begin
+      tempfile = FileHelper.download(upload.url, max_file_size: 30.megabyte, tmp_file_name: "#{SecureRandom.hex}.#{upload.extension}")
+    rescue => e
+      puts "Failed to download #{upload.url} #{e}"
+    end
+
     if tempfile
       puts "Successfully downloaded upload id: #{upload.id} - #{upload.url} fixing upload"
 

GitHub sha: 5be26c7d