0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 08:50:57 -05:00

🐛 Fix awsns handler, convert it ot async

This commit is contained in:
Andrey Antukh 2022-02-28 12:06:47 +01:00
parent 05c77d0248
commit 0416082d4d

View file

@ -26,7 +26,8 @@
(defmethod ig/init-key ::handler (defmethod ig/init-key ::handler
[_ cfg] [_ cfg]
(fn [request] (fn [request respond raise]
(try
(let [body (parse-json (slurp (:body request))) (let [body (parse-json (slurp (:body request)))
mtype (get body "Type")] mtype (get body "Type")]
(cond (cond
@ -43,8 +44,12 @@
:else :else
(l/warn :hint "unexpected data received" (l/warn :hint "unexpected data received"
:report (pr-str body))) :report (pr-str body))))
{:status 200 :body ""}))) (catch Throwable cause
(l/error :hint "unexpected exception on awsns handler"
:cause cause)))
(respond {:status 200 :body ""})))
(defn- parse-bounce (defn- parse-bounce
[data] [data]