Nial, What type of parser are you using? Most parsers will throw an exception if the content isn't of the expected format.
Doug Williams Twitter API Support http://twitter.com/dougw On Thu, Mar 19, 2009 at 4:50 PM, Nial <nia...@gmail.com> wrote: > > Ah, thanks for the feedback. May I ask how you check for HTML-like > responseText accurately? I think some nice regex would do the trick > but don't want to reinvent any wheels! > > On Mar 19, 8:44 pm, Doug Williams <d...@twitter.com> wrote: > > Cameron's solution looks like a good one at this time. This issue [1] > tracks > > the problem. > > > > 1.http://code.google.com/p/twitter-api/issues/detail?id=220 > > > > Doug Williams > > Twitter API Supporthttp://twitter.com/dougw > > > > On Thu, Mar 19, 2009 at 4:10 PM, Cameron Kaiser <spec...@floodgap.com > >wrote: > > > > > > > > > > > > > > While grabbing the latest tweets from the friend timeline I will > > > > occasionally receive the full page HTML to the Twitter - Over > capacity > > > > page ('Twitter is over capacity. Too many tweets', etc). This breaks > > > > my JSON parser and causes a nasty error. I pretty sure I'm accurately > > > > checking for HTTP status codes, so what am I doing wrong here? > > > > > I have guard code in my parser to see if the raw data looks like HTML. > If > > > it does, it prints an error message. > > > > > -- > > > ------------------------------------ personal: > > >http://www.cameronkaiser.com/-- > > > Cameron Kaiser * Floodgap Systems *www.floodgap.com* > > > ckai...@floodgap.com > > > -- We won. Every computer in the world is basically a Mac now. -- S. > > > Wozniak -- >