0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 07:50:43 -05:00

Add better reporting for s3 storage backend errors

This commit is contained in:
Andrey Antukh 2024-10-25 16:11:20 +02:00
parent e5bdd852ca
commit 225c2ca6e6

View file

@ -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)]