googleads/googleads-python-lib — pull request #27 by oseemann (2014-09-24 08:43:15+00:00)
Title: Handle and raise OAuth errors

The current CreateHttpHeader implementation silently omits the Authorization
header when fetching an access token with the refresh token fails.

This commit introduces basic error handling for failed OAuth requests. It
maps the error string from the response body to an exception type.

On a side note, I wonder why the oauth lib doesn't do this. Maybe we should
consider using a different implementation that properly handles OAuth errors
for us, instead of re-implementing stuff from the OAuth RFC.