Catching Exceptions from the PHP Client Library


If you are using the PHP client library and see an error like "Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Expected response code 200, got 400' in ..." What you should really do is surround your code in a try block and use a catch statement like this:
catch(Zend_Gdata_App_HttpException $exception) {
    echo "Error: " . $exception->getResponse()->getRawBody();
}
Usually this will print a more informative message describing the reason for failure.

2 comments:

Alexon said...

It looks so good for me

Alexon said...

I have always dreamed of Ukrainian girls, I came across the site best ukrainian brides and was completely delighted, hundreds of Ukrainian women, the most beautiful and the hottest. They are just great. I corresponded a lot there and realized that they are gentle, smart, beautiful. I even came to visit one of them, and my God, she cooks beautifully, dresses beautifully and with a sense of humor, everything is fine, I recommend this site to everyone, it is the best in the world, we will have a wedding soon. So I really recommend everyone to register here.