Bug in beta 3.0 - TwitterQueryException

Dec 16, 2013 at 10:30 AM
Hi Joe,
first of all I have to say thank you for this great Twitter API library. I'm developing a new twitter app for Windows Phone 8.
And again thanks for the async support. This enhance the development!

Btw I'm here to report you a nasty bug in beta 3.0 that I've solved in source code but it exists also in the binary.

When you, for example, retweet a user which has protected tweets, Twitter returns an error because you cannot retweet but Linq2twitter (in this beta) gives a application error since there's an error in catching the Json error returned.

It's important to have a twitterQueryException instead of a ApplicationError. I hope you can resolve this bug.

Thanks in advance!

Alessandro

This is the stacktrace:

at LitJson.JsonData.EnsureCollection()
at LitJson.JsonData.get_Count()
at LinqToTwitter.TwitterErrorHandler.ParseTwitterErrorMessage(String responseStr)
at LinqToTwitter.TwitterErrorHandler.BuildAndThrowTwitterQueryException(String responseStr, HttpResponseMessage msg)
at LinqToTwitter.TwitterErrorHandler.<HandleGenericErrorAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at LinqToTwitter.TwitterErrorHandler.<ThrowIfErrorAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at LinqToTwitter.TwitterExecute.<HandleResponseAsync>d__43.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at LinqToTwitter.TwitterExecute.<PostToTwitterAsync>d__34
1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at LinqToTwitter.TwitterContext.<RetweetAsync>d__16d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult()
at TwitterLibrary.TwitterQuery.<Retweet>d__11b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at TwitNewsHub.Views.Friends.<btnRetweet_Tapped>d__a.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__0(Object state)
Coordinator
Dec 16, 2013 at 3:49 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.