mirror of
https://github.com/penpot/penpot.git
synced 2026-08-01 19:06:18 +00:00
🐛 Properly report importation errors
This commit is contained in:
parent
8a63089773
commit
37d0cec265
@ -61,6 +61,8 @@
|
|||||||
(let [result (handler)]
|
(let [result (handler)]
|
||||||
(events/tap :end result))
|
(events/tap :end result))
|
||||||
(catch Throwable cause
|
(catch Throwable cause
|
||||||
|
(l/err :hint "unexpected error on processing sse response"
|
||||||
|
:cause cause)
|
||||||
(events/tap :error (errors/handle' cause request)))
|
(events/tap :error (errors/handle' cause request)))
|
||||||
(finally
|
(finally
|
||||||
(sp/close! events/*channel*)
|
(sp/close! events/*channel*)
|
||||||
|
|||||||
@ -30,14 +30,12 @@
|
|||||||
|
|
||||||
;; --- Command: export-binfile
|
;; --- Command: export-binfile
|
||||||
|
|
||||||
(def ^:private
|
(def ^:private schema:export-binfile
|
||||||
schema:export-binfile
|
[:map {:title "export-binfile"}
|
||||||
(sm/define
|
[:name :string]
|
||||||
[:map {:title "export-binfile"}
|
[:file-id ::sm/uuid]
|
||||||
[:name :string]
|
[:include-libraries :boolean]
|
||||||
[:file-id ::sm/uuid]
|
[:embed-assets :boolean]])
|
||||||
[:include-libraries :boolean]
|
|
||||||
[:embed-assets :boolean]]))
|
|
||||||
|
|
||||||
(sv/defmethod ::export-binfile
|
(sv/defmethod ::export-binfile
|
||||||
"Export a penpot file in a binary format."
|
"Export a penpot file in a binary format."
|
||||||
@ -76,13 +74,11 @@
|
|||||||
{:id project-id})
|
{:id project-id})
|
||||||
result))
|
result))
|
||||||
|
|
||||||
(def ^:private
|
(def ^:private schema:import-binfile
|
||||||
schema:import-binfile
|
[:map {:title "import-binfile"}
|
||||||
(sm/define
|
[:name :string]
|
||||||
[:map {:title "import-binfile"}
|
[:project-id ::sm/uuid]
|
||||||
[:name :string]
|
[:file ::media/upload]])
|
||||||
[:project-id ::sm/uuid]
|
|
||||||
[:file ::media/upload]]))
|
|
||||||
|
|
||||||
(sv/defmethod ::import-binfile
|
(sv/defmethod ::import-binfile
|
||||||
"Import a penpot file in a binary format."
|
"Import a penpot file in a binary format."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user