Class Twitter::ServiceUnavailableError
In: lib/twitter/core.rb
Parent: RESTError

Runtime error leaf class raised when Twitter.com servers are unable to respond to the current load. HTTP code: 502 (aka Service Unavailable).

To handle specifically you would do the following:

 begin
   timeline = twitter.timeline_for(:friends, :since => tweet)
 rescue ServiceUnavailableError => sue
   #
 end

[Validate]