mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 10:57:04 +08:00
FIX: attempt to output a useful error message
currently AWS problems will just dump a stack trace
This commit is contained in:
parent
f4502d7739
commit
aee3c2c34d
|
@ -228,9 +228,9 @@ class S3Helper
|
|||
end
|
||||
|
||||
def download_file(filename, destination_path, failure_message = nil)
|
||||
unless object(filename).download_file(destination_path)
|
||||
raise failure_message&.to_s || "Failed to download file"
|
||||
end
|
||||
object(filename).download_file(destination_path)
|
||||
rescue => err
|
||||
raise failure_message&.to_s || "Failed to download #{filename} because #{err.message}"
|
||||
end
|
||||
|
||||
def s3_client
|
||||
|
|
Loading…
Reference in New Issue
Block a user