0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-03 12:59:12 -05:00

fix(backend): raise proper exception on input is binary data on svgparse

This commit is contained in:
Andrey Antukh 2019-06-24 19:50:54 +02:00
parent 48d5188aaa
commit 076c29e004

View file

@ -67,8 +67,13 @@
(ex/raise :type :validation (ex/raise :type :validation
:code ::invalid-input :code ::invalid-input
:message "Input does not seems to be a valid svg.")) :message "Input does not seems to be a valid svg."))
(catch org.jsoup.UncheckedIOException e
(ex/raise :type :validation
:code ::invalid-input
:message "Input does not seems to be a valid svg."))
(catch Exception e (catch Exception e
(.printStackTrace e)
(ex/raise :code ::unexpected)))) (ex/raise :code ::unexpected))))
;; --- Public Api ;; --- Public Api