Retrieving Error Codes for Client Login

Showing 1-2 of 2 messages
Retrieving Error Codes for Client Login MVision 9/12/12 7:37 PM
Can anyone explain how to retrieve the error code (403, 401 etc) when making an authorized request using client login and the PHP Zend library? Basically I need some way of checking the error code so my application knows that there is an error logging in (and what error it was). I can't seem to find this info anywhere, I found info on returning the error message but not the code.

Thanks for your help.
Re: Retrieving Error Codes for Client Login Jeffrey Posnick 9/14/12 2:04 PM
Hello,

 Whatever the answer is is specific to the PHP client library, and I don't know it off the top of my head. If you're getting an exception and you want to see all the fields it exposes, how about doing a var_dump() on it to debug what you should be looking at? I'm assuming all the information from the underlying HTTP 40x response gets serialized somewhere in the exception object.

Cheers,
-Jeff Posnick, YouTube API Team
YouTube Developer Relations is hiring! developers.google.com/jobs


On Wednesday, September 12, 2012 10:37:15 PM UTC-4, MVision wrote:
Can anyone explain how to retrieve the error code (403, 401 etc) when making an authorized request using client login and the PHP Zend library? Basically I need some way of checking the error code so my application knows that there is an error logging in (and what error it was). I can't seem to find this info anywhere, I found info on returning the error message but not the code.

Thanks for your help.