diff app/models/tweet.rb @ 156:1abfa910d83e

Don't log, just throw
author nanaya <me@nanaya.pro>
date Sat, 28 Jul 2018 02:46:44 +0900
parents fd7344643903
children 6e6051cd9cca
line wrap: on
line diff
--- a/app/models/tweet.rb	Sat Jul 28 02:01:24 2018 +0900
+++ b/app/models/tweet.rb	Sat Jul 28 02:46:44 2018 +0900
@@ -26,7 +26,7 @@
           if data[:result] == :ok
             if data[:data].any? && data[:data].first.user.id != @twitter_id
               wrong_user = data[:data].first.user
-              Rails.logger.warn "Wrong timeline data. Requested: #{@twitter_id}, got: #{wrong_user.id} (#{wrong_user.name.printable})"
+              throw "Wrong timeline data. Requested: #{@twitter_id}, got: #{wrong_user.id} (#{wrong_user.name.printable})"
             end
 
             data[:data] = data[:data].select do |tweet|