I have been tracking this for about 9 days.  And my users are getting
really peeved, which isn't good.

I want to share what I have found with the group in hopes that
somebody has a work around or knows the correct people to contact at
Google.

Here are the facts as I know them:

Sometime mid day July 9th 2009 Google changed something which started
throwing 502 Bad Gateway errors when a request is made through
gadget.io.makeRequest or it's sister _IG_FetchContent.  This error
comes from the following URL which is the main URL that does all the
work for makeRequest:


http://ig.gmodules.com/gadgets/makeRequest?refresh=3600&url={REQUEST_URL}&httpMethod=GET&contentType=FEED&numEntries=100&getSummaries=true&gadget={GADGET}


which returns this about 50% of the time:


throw 1; < don't be evil' >{"http://www.motortrend.com/widgetrss/gas-
prices-90211.xml":{"body":"","rc":502}}


The above is returned with an HTTP 200 OK response, which fools the
requester in to thinking everything returned correctly.

The proxy which is generated from gadget.io.getProxyUrl is not the
same as the one that is being used to make the request from the
gadget.io.makeRequest method.  However it also has the same problem of
returning a 502 Bad Gateway response.


http://www.ig.gmodules.com/gadgets/proxy/refresh=3600&container=ig&gadget={GADGET}/{REQUEST_URL}


Except this one comes through as an HTTP header and not part of the
content body:


HTTP/1.1 502 Bad Gateway


I have found one way, programatically, to check for this bad
response.  That is to check the RC value that is returned.  This RC
value will contain the HTTP response status, which should be 200 if
everything went correctly.  If something failed it will return a
response other than 200, in the past 9 days most if not all the
responses have been 502.

So for instance if you were using the response as JSON data, it would
look like this to check for the bad response:

getFeedResponse = function(obj) {

        // get the feed object
        var feed = obj.data;

        // check for error receiving data
        if (obj == undefined || obj.rc != 200) {
                // ERROR
        } else {
                // PROCEED NORMALLY
        }
}

Hope this helps, and I hope we can use this thread to track the
problem until Google fixes their servers.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iGoogle Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Gadgets-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to