0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 06:58:58 -05:00

🐛 Properly report importation errors

This commit is contained in:
Andrey Antukh 2024-06-26 14:59:38 +02:00
parent 8a63089773
commit 37d0cec265
2 changed files with 13 additions and 15 deletions

View file

@ -61,6 +61,8 @@
(let [result (handler)]
(events/tap :end result))
(catch Throwable cause
(l/err :hint "unexpected error on processing sse response"
:cause cause)
(events/tap :error (errors/handle' cause request)))
(finally
(sp/close! events/*channel*)

View file

@ -30,14 +30,12 @@
;; --- Command: export-binfile
(def ^:private
schema:export-binfile
(sm/define
[:map {:title "export-binfile"}
[:name :string]
[:file-id ::sm/uuid]
[:include-libraries :boolean]
[:embed-assets :boolean]]))
(def ^:private schema:export-binfile
[:map {:title "export-binfile"}
[:name :string]
[:file-id ::sm/uuid]
[:include-libraries :boolean]
[:embed-assets :boolean]])
(sv/defmethod ::export-binfile
"Export a penpot file in a binary format."
@ -76,13 +74,11 @@
{:id project-id})
result))
(def ^:private
schema:import-binfile
(sm/define
[:map {:title "import-binfile"}
[:name :string]
[:project-id ::sm/uuid]
[:file ::media/upload]]))
(def ^:private schema:import-binfile
[:map {:title "import-binfile"}
[:name :string]
[:project-id ::sm/uuid]
[:file ::media/upload]])
(sv/defmethod ::import-binfile
"Import a penpot file in a binary format."