mirror of
https://github.com/penpot/penpot.git
synced 2025-05-25 12:06:11 +02:00
✨ Add proper error report on binfile/v1 exportation
This commit is contained in:
parent
3d462e3821
commit
a8cf072bda
1 changed files with 11 additions and 5 deletions
|
@ -8,6 +8,7 @@
|
||||||
(:refer-clojure :exclude [assert])
|
(:refer-clojure :exclude [assert])
|
||||||
(:require
|
(:require
|
||||||
[app.binfile.v1 :as bf.v1]
|
[app.binfile.v1 :as bf.v1]
|
||||||
|
[app.common.logging :as l]
|
||||||
[app.common.schema :as sm]
|
[app.common.schema :as sm]
|
||||||
[app.db :as db]
|
[app.db :as db]
|
||||||
[app.http.sse :as sse]
|
[app.http.sse :as sse]
|
||||||
|
@ -50,11 +51,16 @@
|
||||||
::rres/headers {"content-type" "application/octet-stream"}
|
::rres/headers {"content-type" "application/octet-stream"}
|
||||||
::rres/body (reify rres/StreamableResponseBody
|
::rres/body (reify rres/StreamableResponseBody
|
||||||
(-write-body-to-stream [_ _ output-stream]
|
(-write-body-to-stream [_ _ output-stream]
|
||||||
(-> cfg
|
(try
|
||||||
(assoc ::bf.v1/ids #{file-id})
|
(-> cfg
|
||||||
(assoc ::bf.v1/embed-assets embed-assets)
|
(assoc ::bf.v1/ids #{file-id})
|
||||||
(assoc ::bf.v1/include-libraries include-libraries)
|
(assoc ::bf.v1/embed-assets embed-assets)
|
||||||
(bf.v1/export-files! output-stream))))}))
|
(assoc ::bf.v1/include-libraries include-libraries)
|
||||||
|
(bf.v1/export-files! output-stream))
|
||||||
|
(catch Throwable cause
|
||||||
|
(l/err :hint "exception on exporting file"
|
||||||
|
:file-id (str file-id)
|
||||||
|
:cause cause)))))}))
|
||||||
|
|
||||||
;; --- Command: import-binfile
|
;; --- Command: import-binfile
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue