GetLoggedUser fails intermittently

Feb 9, 2015 at 8:17 AM
Every now and again I get an error when I call User.GetLoggedUser()

I thought this might be down to rate limiting since this is done every time I start my development application in the IDE.

However, this morning it started doing it on the second or third run. The error I am getting is

A first chance exception of type 'System.Net.WebException' occurred in System.dll
A first chance exception of type 'System.AggregateException' occurred in mscorlib.dll
A first chance exception of type 'Tweetinvi.Logic.Exceptions.TwitterException' occurred in TweetinviAPI.dll

At the same time I am seeing the http request details in the debugger output window (presumable from Tweetinvi)
GET : https://api.twitter.com/1.1/account/verify_credentials.json
Header OAuth oauth_consumer_key="<HIDDEN>",oauth_nonce="5185860",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1423473040",oauth_token="<HIDDEN>",oauth_version="1.0",oauth_signature="<HIDDEN>"

Any ideas ?
Thanks
Coordinator
Feb 9, 2015 at 4:24 PM
Could you give me the details of the ExceptionHandler.GetLastException()?

Cheers,
Linvi
Feb 10, 2015 at 9:24 AM
The inner exception indicates that this is being caused by rate limiting (code 88). This error was done in conjunction with running startstream/stopstream timeouts being too short (see https://tweetinvi.codeplex.com/discussions/573889) so presumably the verify_credentials call was over limit.

"The remote server returned an error: (429) Too Many Requests. / Rate limit exceeded,88"

Thanks.