be more friendly to square failures.
This commit is contained in:
@@ -504,11 +504,16 @@
|
|||||||
|
|
||||||
(catch [:status 401] data
|
(catch [:status 401] data
|
||||||
(mark-integration-status client {:integration-status/state :integration-state/unauthorized
|
(mark-integration-status client {:integration-status/state :integration-state/unauthorized
|
||||||
:integration-status/message (-> data :body )}))
|
:integration-status/message (-> data :body str)}))
|
||||||
(catch Exception e
|
|
||||||
|
(catch [:status 503] data
|
||||||
|
(mark-integration-status client {:integration-status/state :integration-state/failed
|
||||||
|
:integration-status/message (-> data :body str)}))
|
||||||
|
|
||||||
|
(catch Object e
|
||||||
(log/warn e)
|
(log/warn e)
|
||||||
(mark-integration-status client {:integration-status/state :integration-state/failed
|
(mark-integration-status client {:integration-status/state :integration-state/failed
|
||||||
:integration-status/message (.getMessage e)}))))))
|
:integration-status/message (.getMessage (:wrapper &throw-context))}))))))
|
||||||
|
|
||||||
(mount/defstate square-loader
|
(mount/defstate square-loader
|
||||||
:start (scheduler/every (* 4 59 60 1000) (heartbeat upsert-all "square-loading"))
|
:start (scheduler/every (* 4 59 60 1000) (heartbeat upsert-all "square-loading"))
|
||||||
|
|||||||
Reference in New Issue
Block a user