Error checking authorization

16 views
Skip to first unread message

Tim Johnson

unread,
Sep 7, 2017, 10:59:36 PM9/7/17
to AdWords API Forum
Hi, 

I am looking to handle errors when using:

OAuth2TokenBuilder()
and
AdWordsSessionBuilder()

The examples online do not seem to show what methods can be used to return the errors; getPartialFailureErrors() isn't a method for those classes.  Is there something similar that I can use to log and describe when I have been unable to create a session?

Thanks,
Tim

Vincent Racaza (AdWords API Team)

unread,
Sep 11, 2017, 6:04:50 AM9/11/17
to AdWords API Forum
Hi Tim,

Apologies for the delayed response.

For both OAuth2TokenBuilder and AdWordsSessionBuilder, a known exception to be thrown is InvalidArgumentExceptionFor other generic API exceptions, an ApiException is thrown.

With this, you can implement an exception handling mechanism on your end and catch these exceptions for further processing.

Thanks,
Vincent
AdWords API Team
Reply all
Reply to author
Forward
0 new messages