I have this line in my view file:
- tweets = Twitter.user_timeline(@organization.twitter_name)
The attr twitter_name is entered by the user. If they enter an invalid twitter account name, it throws a 404 error.
How can I deal with the erro开发者_如何学编程r to avoid getting this action controller exception? Twitter::NotFound in Organizations#show
You ca use rescue to catch an exception and show a user friendly error message
加载中,请稍侯......
精彩评论