0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 00:40:30 -05:00

Report error on something goes wrong on image processing

This commit is contained in:
Andrey Antukh 2023-07-10 14:56:38 +02:00
parent e5a7edeaf6
commit d1a7c58c53

View file

@ -9,6 +9,7 @@
(:require (:require
[app.common.data :as d] [app.common.data :as d]
[app.common.exceptions :as ex] [app.common.exceptions :as ex]
[app.common.logging :as l]
[app.common.media :as cm] [app.common.media :as cm]
[app.common.schema :as sm] [app.common.schema :as sm]
[app.common.schema.generators :as sg] [app.common.schema.generators :as sg]
@ -226,6 +227,7 @@
(defmethod process-error org.im4java.core.InfoException (defmethod process-error org.im4java.core.InfoException
[error] [error]
(l/error :hint "unexpected error on processing image" :cause error)
(ex/raise :type :validation (ex/raise :type :validation
:code :invalid-image :code :invalid-image
:hint "invalid image" :hint "invalid image"