Skip to content

Commit a50d661

Browse files
author
francesco-magnoni
committed
curl errors handling
1 parent 09cf376 commit a50d661

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/imageproxy/convert.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ def try_command_with_timeout cmd
3434
puts "Command timed out after 10 seconds, retrying >#{cmd}<"
3535
execute_command cmd
3636
puts "SUCCESS " * 20
37+
rescue Exception => e
38+
puts "Error while retrieving #{options.source}"
39+
execute_command %'convert #{Dir.pwd}/public/noImage.png #{convert_options} #{new_format}#{file.path}'
3740
end
3841

3942
def convert_options

0 commit comments

Comments
 (0)