-
Notifications
You must be signed in to change notification settings - Fork 975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect handling of 401 error response #451
Comments
@wihl Do you have any updates regarding this issue? It's still appear in the system. Instead of the SOAP XML answer from the Google Ads API server we receive an HTML response with the next body: <HTML>
<HEAD>
<TITLE>Unauthorized</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Unauthorized</H1>
<H2>Error 401</H2>
</BODY>
</HTML> Because of this it's an error appeared in the Seems that someone on the Google Ads API side needs to fix the issue. We provide the correct Auth Token, but the user doesn't have any of Google Ads accounts. Seems that this error appears because of this, please check the case. Used versions of the Python libs:
|
We are also getting an HTML response when calling <HTML>
<HEAD>
<TITLE>Unauthorized</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Unauthorized</H1>
<H2>Error 401</H2>
</BODY>
</HTML> |
This is working as intended. Requests without a valid access token will return a 401 response, not a SOAP response. |
@christopherseeley An error of type |
Good point, we can look into improving handling of 401's in the library |
For a single user, using his refresh token to do the following:
We get the following:
The exception object is of type Fault, and contains the following response:
I am guessing the API is not returning a proper SOAP response, instead - it is returning an HTML response denoting the error.
I am not sure if the library should handle this, or if the API behavior is invalid.
The text was updated successfully, but these errors were encountered: