This project has moved and is read-only. For the latest updates, please go here.

WebException was unhandled by user code

Dec 14, 2010 at 7:47 PM

Hi Joe,

How can i handle WebExceptions like

i am unable to get following exceptions thrown by twitter like The remote server returned an error: (400) Bad Request.

 var ctx = new TwitterContext();
  var queryResults = (from search in ctx.Search
            where search.Type == SearchType.Search &&
            search.Query == searchTerm.Trim() &&
             search.PageSize == pageSize 
        select search).FirstOrDefault();

 foreach (var entry in queryResults.Entries)


catch (TwitterQueryException ex) // or Exception class

Dec 15, 2010 at 3:36 AM

Hi Shahid,

This is a bug.  I'll add it to the issue list.



Dec 15, 2010 at 3:36 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.