Skip to content

Commit 68c5ab1

Browse files
committed
enhance(rtc): update e->ex-info to handle m/race-failure
1 parent 2a67e7e commit 68c5ab1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/frontend/worker/rtc/exception.cljs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,10 @@ the server will put it to s3 and return its presigned-url to clients."}
5757
(cond
5858
(instance? Cancelled e) (ex-info "missionary.Cancelled" {:message (.-message e)})
5959
(instance? js/CloseEvent e) (ex-info "js/CloseEvent" {:type (.-type e)})
60+
61+
;; m/race-failure
62+
(and (instance? ExceptionInfo e)
63+
(contains? (ex-data e) :missionary.core/errors))
64+
(ex-info (ex-message e) (update (ex-data e) :missionary.core/errors (fn [errors] (map e->ex-info errors))))
65+
6066
:else e))

0 commit comments

Comments
 (0)