From fe83c5faea62a39050cd07b7eadca482dbe92d16 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 25 Oct 2024 16:11:20 +0200 Subject: [PATCH] :sparkles: Add better reporting for s3 storage backend errors --- backend/src/app/storage/s3.clj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/src/app/storage/s3.clj b/backend/src/app/storage/s3.clj index 01e970602..e7e176463 100644 --- a/backend/src/app/storage/s3.clj +++ b/backend/src/app/storage/s3.clj @@ -142,6 +142,8 @@ (ex/raise :type :not-found :code :object-not-found :hint "s3 object not found" + :object-id (:id object) + :object-path (impl/id->path (:id object)) :cause result) (and (ex/instance? java.nio.file.FileAlreadyExistsException result) @@ -242,10 +244,12 @@ {:name "penpot/s3/uploader" :virtual true :daemon true} - (l/trace :hint "start upload thread" + (l/debug :hint "start upload thread" :object-id (str id) :size (impl/get-size content) ::l/sync? true) + + ;; FIXME: improve buffer reusing (let [stream (io/input-stream content) bsize (* 1024 64) tpoint (dt/tpoint)]