mirror of
https://github.com/penpot/penpot.git
synced 2025-06-02 06:31:37 +02:00
🎉 Add save indicator.
And improve persistence loop error handling.
This commit is contained in:
parent
9755516178
commit
1b598e2f6d
8 changed files with 414 additions and 254 deletions
|
@ -20,11 +20,16 @@
|
|||
(http/success? response)
|
||||
(rx/of (:body response))
|
||||
|
||||
(http/client-error? response)
|
||||
(or (http/client-error? response)
|
||||
(= 500 (:status response)))
|
||||
(rx/throw (:body response))
|
||||
|
||||
(http/server-error? response)
|
||||
(rx/throw (:body response))
|
||||
(= 502 (:status response))
|
||||
(rx/throw {:type :bad-gateway
|
||||
:body (:body response)})
|
||||
|
||||
(= 0 (:status response))
|
||||
(rx/throw {:type :offline})
|
||||
|
||||
:else
|
||||
(rx/throw {:type :unexpected
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue