Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: REST API Timeout. Cannot see requests getting sent

$
0
0
Hi Linvi,
I'm having some trouble getting you that information because that event doesn't seem to be firing for every type of query.
I'd left it running overnight and have got a number of exceptions like the one I posted yesterday, but when searching the Logs DB for distinct query URLs I only get:
Query: https://api.twitter.com/1.1/application/rate_limit_status.json
Query: https://api.twitter.com/1.1/direct_messages.json?count=200

I've changed it to try and find the problem in the direct messages with:
TweetinviEvents.QueryAfterExecute += (sender, args) =>
            {
                var jsonResult = args.JsonResult;
                var query = args.QueryURL;

                DefaultLog.Debug("Query: {0}", query);
                DefaultLog.Debug("JSON Result:\n{0}", jsonResult);

                if(query.Contains("direct_messages.json"))
                {
                    try
                    {
                        IMessageDTO messageDto = Newtonsoft.Json.JsonConvert.DeserializeObject<MessageDTO>(jsonResult);
                    }
                    catch(Exception e)
                    {
                        DefaultLog.Error("MessageDTO Derserialization Exception:\n{0}", e);
                    }
                }
            };
Hopefully that should throw something up.
Cheers,
Josh

Viewing all articles
Browse latest Browse all 4126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>