From 073ae514c36c2932841f7c16007350760019242e Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Thu, 7 Mar 2019 20:05:29 +0800 Subject: [PATCH] Trap exception when failed to move blob to tombstone. --- lib/azure_blob_store.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/azure_blob_store.rb b/lib/azure_blob_store.rb index bad4ac1..14d38ef 100644 --- a/lib/azure_blob_store.rb +++ b/lib/azure_blob_store.rb @@ -34,6 +34,8 @@ def remove_file(url, path) source_blob_name) # delete the file blob_service.delete_blob(azure_blob_container, source_blob_name) + rescue StandardError => exception + Rails.logger.warn("Blob can not be moved to tombstone: #{exception}\nUrl: #{url}\nBlob: #{source_blob_name}") end def has_been_uploaded?(url)