Podio.NET receives HTML and cannot parse, 502 Bad Gateway
Hello all, I've been trying to diagnose some issues with our application that accesses the Podio API and I was getting some interesting errors that I couldn't catch. I forked the Podio.NET library and inserted my own logger statements into the lowest request calls and dug into the uncaught JSON parsing exception was bringing this application to it's knees. The only hint was that it was having trouble parsing the first character "<", so I figured it was getting some weird HTML response. Sure enough it was, this happens about every other week on a completely random API request. At first I was concerned this was a rate limit of some sort but I debugged everything extremely carefully, watching the number of requests as tracked by the library itself and this happens whether we are close to our limit or not. <head><title>502 Bad Gateway</title></head> I passed this on to support but was told to post here, so I'm hoping someone may be able to clarify what is going on. We do not have any Nginx boxes between us and the API endpoint so this is a message received from the endpoint itself. Is anyone else experiencing this behavior? |
-
Hi Ajmal, sorry for the delayed response.
The version I'm testing is based on commit 587e1757 with slight modifications to allow me to log the output of the responses to the requests. If you would like me to give you a patch to see what I'm seeing I can definitey do so. I'm sure there's an easier way to do that but this way was the quickest. Currently I do not know of any way to replicate this error, it happens very infrequently (enough to annoy the person running the report) and there do not appear to be anything in common between the items that it fails on. Unfortunately I'm not sure there is a problem in the API, 502 bad gateway seems like something that would be an issue on behalf of the host of the API. In the next week I will update to a more recent commit and see if the issue no longer happens, which will take a while to confirm.
Please sign in to leave a comment.
Comments
2 comments