Ruby on rails twitterapi:当Twitter';s的空气污染指数下降了?

Ruby on rails twitterapi:当Twitter';s的空气污染指数下降了?,ruby-on-rails,twitter,Ruby On Rails,Twitter,我的网站上有一个简单的“最新推文”部分。它使用TwitterGem,只需调用TwitterAPI来获取最新的2条推文,然后将它们放到页面上 现在,Twitter的API已经关闭,我的网站正在抛出Twitter::Error::DecodeError。我如何解释这种情况并妥善处理 begin # twitter api call stuff here rescue Twitter::Error::DecodeError => e # stuff you want to make ha

我的网站上有一个简单的“最新推文”部分。它使用TwitterGem,只需调用TwitterAPI来获取最新的2条推文,然后将它们放到页面上

现在,Twitter的API已经关闭,我的网站正在抛出Twitter::Error::DecodeError。我如何解释这种情况并妥善处理

begin
  # twitter api call stuff here
rescue Twitter::Error::DecodeError => e
  # stuff you want to make happen then the error is raised i.E.
  Airbrake.notify_or_ignore(e, :parameters => params, :session_data => session)
  # optional raise the error after the catch to handle it elsethere or if you want it to raise
  raise e 
end