This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-15
Channels
- # aws (25)
- # babashka (2)
- # babashka-sci-dev (3)
- # beginners (39)
- # clj-kondo (69)
- # cljdoc (2)
- # clojars (6)
- # clojure (13)
- # clojure-dev (8)
- # clojure-europe (3)
- # clojure-uk (1)
- # clojurescript (6)
- # datomic (3)
- # honeysql (5)
- # introduce-yourself (3)
- # lsp (10)
- # malli (8)
- # membrane (16)
- # off-topic (8)
- # pedestal (6)
- # re-frame (28)
- # releases (3)
- # shadow-cljs (10)
- # tools-deps (38)
I have a feeling there's a function like (fn [xs] (reductions conj [] xs))
somewhere in the standard lib, but I can't find it. Am I mistaken?
@ghadi I plan on making heavy use of iteration
. What’s your recommended pattern for handling failures that happen when using iteration
to call external APIs? Have you implemented retry logic with iteration
for failed calls?
I’m assuming you use halt-when
. Do you throw exceptions ever? What general guidelines / recommendations can you provide?
@ghadi Thanks for the explanations below. That’s all very helpful. I’ll probably end up putting retry logic into the step!
function. I was completely unaware of halt-when
until about 60 minutes ago when I watched the Zoom call video thing covering the current alpha Clojure release. That get-textract-results
example is very helpful. I really like the way that I can handle errors while still returning the results that were created / accumulated up to that point.
This will greatly clean up my code!
@stephenmhopper I think it makes sense to put retry logic in either the step!
or within the caller of iteration
I have a couple usages with the cognitect aws-api client where the :some?
arg looks for an anomaly
but, in that case, if :some?
is false on an anomaly, the anomaly will not be included in the output
you can also include the anomaly in the output by making it a valid output in :some?
, then having the :kf
not proceed to the next step upon an anomaly