Merge pull request #36 from raboof/twitter-error-handling

Handle/report twitter errors
This commit is contained in:
Dmitri Sotnikov 2020-03-22 10:27:45 -04:00 committed by GitHub
commit 9a216f5fa7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -179,9 +179,11 @@
(defn post-tweets [last-post-time] (defn post-tweets [last-post-time]
(fn [error tweets response] (fn [error tweets response]
(if (nil? error)
(->> (js->edn tweets) (->> (js->edn tweets)
(map parse-tweet) (map parse-tweet)
(post-items last-post-time)))) (post-items last-post-time))
(exit-with-error error))))
(defn strip-utm [news-link] (defn strip-utm [news-link]
(first (string/split news-link #"\?utm"))) (first (string/split news-link #"\?utm")))