FEATURE: Improve handling of backup storage errors

This commit is contained in:
Gerhard Schlager
2019-02-20 15:15:38 +01:00
parent 33269c4172
commit 6a8007e5fb
5 changed files with 29 additions and 16 deletions

View File

@ -49,6 +49,9 @@ module BackupRestore
ensure_cors!
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
end
private