From d46274abf23df30d85cfb57c6042fcab3f11f224 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 10 Oct 2024 11:43:09 +0200 Subject: [PATCH] :sparkles: Add better error reporting on zip file importation --- frontend/src/app/worker/import.cljs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/worker/import.cljs b/frontend/src/app/worker/import.cljs index 79e1e5f26..43a9db654 100644 --- a/frontend/src/app/worker/import.cljs +++ b/frontend/src/app/worker/import.cljs @@ -817,9 +817,12 @@ :errors (:errors file) :file-id (:file-id data)}))))))) (rx/catch (fn [cause] - (log/error :hint (ex-message cause) - :file-id (:file-id data) - :cause cause) + (let [data (ex-data cause)] + (log/error :hint (ex-message cause) + :file-id (:file-id data)) + (when-let [explain (:explain data)] + (js/console.log explain))) + (rx/of {:status :import-error :file-id (:file-id data) :error (ex-message cause)