FEATURE: Include details about S3 backup storage errors (#12257)

This commit is contained in:
Gerhard Schlager 2021-03-02 15:29:37 +01:00 committed by GitHub
parent c21cba70f6
commit 154bfcf750
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ module BackupRestore
presigned_url(obj, :put, UPLOAD_URL_EXPIRES_AFTER_SECONDS)
rescue Aws::Errors::ServiceError => e
Rails.logger.warn("Failed to generate upload URL for S3: #{e.message.presence || e.class.name}")
raise StorageError
raise StorageError.new(e.message.presence || e.class.name)
end
def vacate_legacy_prefix
@ -81,7 +81,7 @@ module BackupRestore
objects
rescue Aws::Errors::ServiceError => e
Rails.logger.warn("Failed to list backups from S3: #{e.message.presence || e.class.name}")
raise StorageError
raise StorageError.new(e.message.presence || e.class.name)
end
def create_file_from_object(obj, include_download_source = false)