System.InvalidOperationException and RequestProcessingException on User.Lookup Query

Oct 23, 2013 at 11:57 PM
My application was working perfectly fine, and one day, when I tested it, it stopped working. I hadn't updated the code at all, so I know the error occurs on the server side.
After doing a little investigation, I have found that randomly, after querying User.Lookup, the response sometimes has a status of RequestProcessingException with a System.InvalidOperationException as the Exception property. The exception contains the following message: Exception {System.InvalidOperationException: JsonData instance doesn't hold an int
at LitJson.JsonData.LitJson.IJsonWrapper.GetInt()
at LinqToTwitter.Common.TypeConversionExtensions.GetValue[T](JsonData data, String key, T defaultValue)
at LinqToTwitter.Common.TypeConversionExtensions.GetValue[T](JsonData data, String key)
at LinqToTwitter.User..ctor(JsonData user)
at LinqToTwitter.UserRequestProcessor1.<HandleMultipleUserResponse>b__9(JsonData user)
at System.Linq.Enumerable.WhereSelectEnumerableIterator
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at LinqToTwitter.UserRequestProcessor
1.HandleMultipleUserResponse(JsonData userJson)
at LinqToTwitter.UserRequestProcessor1.ProcessResults(String responseJson)
at LinqToTwitter.TwitterExecute.<>c__DisplayClass6
1.<QueryTwitter>b__3(IAsyncResult ar)} System.Exception {System.InvalidOperationException}

Is there something I am doing wrong in my code, or is this on the server side?
Thanks for your help!
Oct 24, 2013 at 12:28 AM
Hi Elliott,

I just recently deployed a new version of LINQ to Twitter, v2.1.10, that fixes this problem.

Oct 24, 2013 at 1:52 AM
Thanks for your help!