diff --git a/frontend/src/app/util/http.cljs b/frontend/src/app/util/http.cljs index 8c613bb33..fe60147a3 100644 --- a/frontend/src/app/util/http.cljs +++ b/frontend/src/app/util/http.cljs @@ -165,6 +165,8 @@ :uri uri :response-type :blob :omit-default-headers true}) + + (rx/filter #(= 200 (:status %))) (rx/map :body) (rx/mapcat wapi/read-file-as-data-url) (rx/map #(hash-map uri %))))) diff --git a/frontend/src/app/worker/import.cljs b/frontend/src/app/worker/import.cljs index 107b09231..abcaa1973 100644 --- a/frontend/src/app/worker/import.cljs +++ b/frontend/src/app/worker/import.cljs @@ -256,6 +256,8 @@ (let [name (cip/get-image-name node) data-uri (cip/get-image-data node)] (->> (upload-media-files file-id name data-uri) + (rx/catch #(do (.error js/console %) + (rx/of node))) (rx/map (fn [media] (-> node