diff --git a/src/clj/auto_ap/square/core.clj b/src/clj/auto_ap/square/core.clj index 6d3669ef..de229eff 100644 --- a/src/clj/auto_ap/square/core.clj +++ b/src/clj/auto_ap/square/core.clj @@ -249,13 +249,17 @@ (catch Exception e (log/warn "error pulling http " e) (retry f (inc i)))) - (log/error "Too many failures")))) + (log/warn "Too many failures")))) (defn get-payment [client p] (:payment (:body (retry #(client/get (str "https://connect.squareup.com/v2/payments/" p) {:headers (client-base-headers client) :as :json :retry-handler retry-4}))))) +(defn halt-if-error [x] + (if (instance? Throwable x) + (throw x) + x)) (defn get-settlement-sales-date [client settlement] (let [concurrent 10 @@ -281,8 +285,10 @@ true (fn [e] (lc/with-context {:source "Square settlements loading "} - (log/error "Error loading sales date details" e)))) + (log/warn "Error loading sales date details" e) + e))) (->> (async/> (async/