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:
parent
48d5188aaa
commit
076c29e004
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue