diff --git a/backend/src/app/binfile/v1.clj b/backend/src/app/binfile/v1.clj index 5f1834cb74..be65b423c9 100644 --- a/backend/src/app/binfile/v1.clj +++ b/backend/src/app/binfile/v1.clj @@ -305,8 +305,9 @@ (defn write-export! [{:keys [::bfc/include-libraries ::bfc/embed-assets] :as cfg}] (when (and include-libraries embed-assets) - (throw (IllegalArgumentException. - "the `include-libraries` and `embed-assets` are mutally excluding options"))) + (ex/raise :type :validation + :code :incompatible-options + :hint "the `include-libraries` and `embed-assets` are mutually exclusive options")) (write-export cfg)) diff --git a/backend/src/app/binfile/v3.clj b/backend/src/app/binfile/v3.clj index d8bab4d25c..cc488f6ab8 100644 --- a/backend/src/app/binfile/v3.clj +++ b/backend/src/app/binfile/v3.clj @@ -222,8 +222,9 @@ [{:keys [::bfc/embed-assets ::bfc/include-libraries] :as cfg} file-id] (when (and include-libraries embed-assets) - (throw (IllegalArgumentException. - "the `include-libraries` and `embed-assets` are mutally excluding options"))) + (ex/raise :type :validation + :code :incompatible-options + :hint "the `include-libraries` and `embed-assets` are mutually exclusive options")) (let [detach? (and (not embed-assets) (not include-libraries))] (db/tx-run! cfg (fn [cfg]