Fix migrate upload url site settings to rescue from invalid URLs.

This commit is contained in:
Guo Xiang Tan 2018-11-15 15:16:14 +08:00
parent 68b640f6a9
commit 901611cb4e
1 changed files with 6 additions and 1 deletions

View File

@ -37,7 +37,12 @@ module Jobs
skip_rate_limit: true,
follow_redirect: true
)
rescue OpenURI::HTTPError, Net::OpenTimeout, Net::ReadTimeout, Errno::ECONNREFUSED => e
rescue OpenURI::HTTPError,
Net::OpenTimeout,
Net::ReadTimeout,
Errno::ECONNREFUSED,
Discourse::InvalidParameters => e
logger.info(
"Error encountered when trying to download file " +
"for #{new_setting}.\n#{e.class}: #{e.message}\n#{e.backtrace.join("\n")}"