Merge remote-tracking branch 'origin/main' into develop

This commit is contained in:
alonso.torres 2022-05-23 10:58:29 +02:00
commit 28e2d64ac6
3 changed files with 10 additions and 4 deletions

View file

@ -143,6 +143,12 @@
(assoc response :body (t/decode-str body))
response)))
(defn conditional-error-decode-transit
[{:keys [body status] :as response}]
(if (and (>= status 400) (string? body))
(assoc response :body (t/decode-str body))
response))
(defn success?
[{:keys [status]}]
(<= 200 status 299))