From cfe7ba34f7fd13410fa3ca83027d0aa205e7addf Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 5 Jan 2024 11:09:21 +0100 Subject: [PATCH] :bug: Fix validation of validation error on file validate ns --- backend/resources/log4j2-devenv.xml | 1 + backend/src/app/http/sse.clj | 3 +++ common/src/app/common/files/validate.cljc | 3 ++- frontend/src/app/worker/import.cljs | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/backend/resources/log4j2-devenv.xml b/backend/resources/log4j2-devenv.xml index a37eb1801..7abb7a188 100644 --- a/backend/resources/log4j2-devenv.xml +++ b/backend/resources/log4j2-devenv.xml @@ -26,6 +26,7 @@ + diff --git a/backend/src/app/http/sse.clj b/backend/src/app/http/sse.clj index c89c91b61..0ece3b329 100644 --- a/backend/src/app/http/sse.clj +++ b/backend/src/app/http/sse.clj @@ -80,6 +80,9 @@ (try (tap "end" (handler)) (catch Throwable cause + (binding [l/*context* (errors/request->context request)] + (l/err :hint "unexpected error process streaming response" + :cause cause)) (tap "error" (errors/handle' cause request))) (finally (sp/close! *channel*) diff --git a/common/src/app/common/files/validate.cljc b/common/src/app/common/files/validate.cljc index f6d12ada0..280271701 100644 --- a/common/src/app/common/files/validate.cljc +++ b/common/src/app/common/files/validate.cljc @@ -48,7 +48,8 @@ :not-head-main-not-allowed :not-head-copy-not-allowed :not-component-not-allowed - :component-nil-objects-not-allowed}) + :component-nil-objects-not-allowed + :instance-head-not-frame}) (def ^:private schema:error diff --git a/frontend/src/app/worker/import.cljs b/frontend/src/app/worker/import.cljs index 96bd5d7b9..fe923aec7 100644 --- a/frontend/src/app/worker/import.cljs +++ b/frontend/src/app/worker/import.cljs @@ -728,7 +728,7 @@ ::log/sync? true) (let [edata (if (map? cause) cause (ex-data cause))] (println "Error data:") - (pp/pprint (dissoc edata :explain) {:level 2 :length 10}) + (pp/pprint (dissoc edata :explain) {:level 3 :length 10}) (when (string? (:explain edata)) (js/console.log (:explain edata)))