mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 18:48:37 -05:00
✨ Discard wrong queued change if back fails.
This commit is contained in:
parent
39fb611160
commit
6f64053dd5
1 changed files with 7 additions and 3 deletions
|
@ -125,9 +125,13 @@
|
||||||
(rx/map #(shapes-changes-persisted file-id %))))))
|
(rx/map #(shapes-changes-persisted file-id %))))))
|
||||||
|
|
||||||
on-error
|
on-error
|
||||||
(fn [error]
|
(fn [{:keys [type status] :as error}]
|
||||||
(rx/of (update-persistence-status {:status :error
|
(if (and (= :server-error type)
|
||||||
:reason (:type error)})))]
|
(= 502 status))
|
||||||
|
(rx/of (update-persistence-status {:status :error :reason type}))
|
||||||
|
(rx/of update-persistence-queue
|
||||||
|
(update-persistence-status {:status :error :reason type}))))]
|
||||||
|
|
||||||
|
|
||||||
(when (= file-id (:id file))
|
(when (= file-id (:id file))
|
||||||
(->> (rp/mutation :update-file params)
|
(->> (rp/mutation :update-file params)
|
||||||
|
|
Loading…
Add table
Reference in a new issue