From a7ffde8f89ee0e0e79b3300fbb3130f35b6b0f88 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Sat, 5 Nov 2022 09:44:34 -0400 Subject: [PATCH] Warn on copy failure --- lib/philomena/objects.ex | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/philomena/objects.ex b/lib/philomena/objects.ex index 23a55d52..cfd492d8 100644 --- a/lib/philomena/objects.ex +++ b/lib/philomena/objects.ex @@ -71,9 +71,13 @@ defmodule Philomena.Objects do # |> ExAws.request!(opts[:config_overrides]) # end) - file_path = Briefly.create!() - download_file(source_key, file_path) - upload(dest_key, file_path) + try do + file_path = Briefly.create!() + download_file(source_key, file_path) + upload(dest_key, file_path) + rescue + _ -> Logger.warn("Failed to copy #{source_key} -> #{dest_key}") + end end #