Improved error handling/logging for tweet import.

This commit is contained in:
Martin Edenhofer 2017-05-01 10:48:43 +02:00
parent 1fbd368f02
commit 7a1df2e400

View file

@ -274,9 +274,9 @@ class TweetBase
begin begin
parent_tweet = @client.status(tweet.in_reply_to_status_id) parent_tweet = @client.status(tweet.in_reply_to_status_id)
ticket = to_group(parent_tweet, group_id, channel) 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 # 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 end
end end