From 7a1df2e4000ca0649b028bdeae9a8775d6da4443 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 1 May 2017 10:48:43 +0200 Subject: [PATCH] Improved error handling/logging for tweet import. --- lib/tweet_base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tweet_base.rb b/lib/tweet_base.rb index a5608a37d..3c1388bef 100644 --- a/lib/tweet_base.rb +++ b/lib/tweet_base.rb @@ -274,9 +274,9 @@ class TweetBase begin parent_tweet = @client.status(tweet.in_reply_to_status_id) ticket = to_group(parent_tweet, group_id, channel) - rescue Twitter::Error::NotFound + rescue Twitter::Error::NotFound, Twitter::Error::Forbidden => e # just ignore if tweet has already gone - Rails.logger.info "Can't import tweet (#{tweet.in_reply_to_status_id}), tweet not found" + Rails.logger.info "Can't import tweet (#{tweet.in_reply_to_status_id}), #{e.message}" end end end