Browse Source

enhance(rtc): print ex-data when major-schema-version mismatch

rcmerci 9 months ago
parent
commit
9c8696ce21
1 changed files with 9 additions and 1 deletions
  1. 9 1
      src/main/frontend/handler/db_based/rtc.cljs

+ 9 - 1
src/main/frontend/handler/db_based/rtc.cljs

@@ -1,6 +1,7 @@
 (ns frontend.handler.db-based.rtc
 (ns frontend.handler.db-based.rtc
   "RTC handler"
   "RTC handler"
   (:require [cljs-time.core :as t]
   (:require [cljs-time.core :as t]
+            [clojure.pprint :as pp]
             [frontend.common.missionary :as c.m]
             [frontend.common.missionary :as c.m]
             [frontend.config :as config]
             [frontend.config :as config]
             [frontend.db :as db]
             [frontend.db :as db]
@@ -122,7 +123,14 @@
                        :create-branch
                        :create-branch
                        (notification-upload-higher-schema-graph! repo)
                        (notification-upload-higher-schema-graph! repo)
                        ;; else
                        ;; else
-                       (notification/show! (:ex-message start-ex) :error))
+                       (do (prn start-ex)
+                           (notification/show! [:div
+                                                [:div (:ex-message start-ex)]
+                                                [:div (-> ex-data*
+                                                          (select-keys [:app :local :remote])
+                                                          pp/pprint
+                                                          with-out-str)]]
+                                               :error)))
 
 
                      :rtc.exception/lock-failed
                      :rtc.exception/lock-failed
                      (js/setTimeout #(<rtc-start! repo) 1000)
                      (js/setTimeout #(<rtc-start! repo) 1000)