🐛 Fix unexpected exception on uploading invalid svg file.

This commit is contained in:
Andrey Antukh 2021-02-09 18:41:14 +01:00 committed by Andrés Moya
parent 946d40e6cd
commit 2b33300d79
2 changed files with 10 additions and 2 deletions

View file

@ -421,6 +421,9 @@
(if (ex/ex-info? error)
(on-error* (ex-data error))
(cond
(= (:code error) :invalid-svg-file)
(rx/of (dm/error (tr "errors.media-type-not-allowed")))
(= (:code error) :media-type-not-allowed)
(rx/of (dm/error (tr "errors.media-type-not-allowed")))