How to rescue 404s from FileHelper.download

https://github.com/discourse/discourse/blob/master/app/jobs/regular/pull_hotlinked_images.rb#L39-L47

In above code whenever FileHelper.download function fail I need to findout the reason for failing. Whether the file is not found (404) or failed for some other reason.

2 Likes