Merge pull request #36 from raboof/twitter-error-handling
Handle/report twitter errors
This commit is contained in:
commit
9a216f5fa7
1 changed files with 5 additions and 3 deletions
|
@ -179,9 +179,11 @@
|
||||||
|
|
||||||
(defn post-tweets [last-post-time]
|
(defn post-tweets [last-post-time]
|
||||||
(fn [error tweets response]
|
(fn [error tweets response]
|
||||||
(->> (js->edn tweets)
|
(if (nil? error)
|
||||||
(map parse-tweet)
|
(->> (js->edn tweets)
|
||||||
(post-items last-post-time))))
|
(map parse-tweet)
|
||||||
|
(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")))
|
||||||
|
|
Reference in a new issue