mirror of
https://github.com/penpot/penpot.git
synced 2025-02-10 00:58:26 -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 %))))))
|
||||
|
||||
on-error
|
||||
(fn [error]
|
||||
(rx/of (update-persistence-status {:status :error
|
||||
:reason (:type error)})))]
|
||||
(fn [{:keys [type status] :as error}]
|
||||
(if (and (= :server-error type)
|
||||
(= 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))
|
||||
(->> (rp/mutation :update-file params)
|
||||
|
|
Loading…
Add table
Reference in a new issue