Mercurial > rsstweet
changeset 25:70d70736faee
Properly rescue 403 and 404.
author | edogawaconan <me@myconan.net> |
---|---|
date | Fri, 05 Sep 2014 23:38:57 +0900 |
parents | c1783bab9035 |
children | a4deb8a43cc3 |
files | app/controllers/tweets_controller.rb |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/app/controllers/tweets_controller.rb Fri Sep 05 23:36:55 2014 +0900 +++ b/app/controllers/tweets_controller.rb Fri Sep 05 23:38:57 2014 +0900 @@ -2,5 +2,9 @@ def show @tweets = Tweet.new(params[:id]).timeline @user = @tweets.first.user + rescue Twitter::Error::NotFound + head :not_found + rescue Twitter::Error::Unauthorized + head :forbidden end end