🎉 Add save indicator.

And improve persistence loop error handling.
This commit is contained in:
Andrey Antukh 2020-09-17 17:59:48 +02:00 committed by Alonso Torres
parent 9755516178
commit 1b598e2f6d
8 changed files with 414 additions and 254 deletions

View file

@ -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